[ci] Run builds on GitHub Actions
This avoids Netlify Build limits
Diff
README.md | 4 ++++
.github/workflows/daily-deploy.yml | 32 ++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
@@ -25,6 +25,10 @@
- NAV data from AMFI is updated daily and published as a SQLite Database by https://github.com/captn3m0/historical-mf-data.
- This website takes the above, and publishes it via Netlify.
## update
Updates to the dataset are published daily around 2330 IST, and the site is deployed again around 0230 IST.
## license
Licensed under the [MIT License](https://nemo.mit-license.org/). See [`LICENSE`](https://github.com/captn3m0/mf.captnemo.in/tree/main/LICENSE) file for details.
@@ -1,0 +1,32 @@
name: Update Data
on:
schedule:
- cron: '0 22 * * *'
jobs:
update:
name: Daily Deploy
runs-on: ubuntu-latest
steps:
- name: Download Historical Mutual Funds Data
run: |
wget https://github.com/captn3m0/historical-mf-data/releases/latest/download/funds.db.zst
unzstd funds.db.zst
echo 'CREATE INDEX "date" ON "nav" ("date","scheme_code")' | sqlite3 funds.db
echo 'CREATE INDEX "nav-scheme" ON "nav" ("scheme_code")' | sqlite3 funds.db
echo 'CREATE INDEX "securities-scheme" ON "securities" ("scheme_code")' | sqlite3 funds.db
echo 'CREATE INDEX "securities-isin" ON "securities" ("isin")' | sqlite3 funds.db
- name: Build Website
run: |
bundle install
bundle exec jekyll build
- name: 'Deploy to Netlify'
uses: jsmrcaga/action-netlify-deploy@v2.0.0
with:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_DEPLOY_TO_PROD: true
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
build_directory: _site
install_command: "echo 'Skipping install command'"
build_command: "echo 'Skipping build command'"