Update Data #709
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Data | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 8 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: "master" | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Set up Node.js 12 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12.x | |
- name: Install python dependencies | |
run: | | |
pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Update Data | |
run: | | |
python ./etl/2024.py | |
git config user.name "opendataday[bot]" | |
git config user.email "[email protected]" | |
git add -A | |
timestamp=$(date -u) | |
git commit -m "Update at ${timestamp}" || exit 0 | |
git push | |
- name: Install JS dependencies | |
run: npm install | |
- name: Build | |
run: | | |
npm run build | |
lektor build | |
- name: Deploy | |
run: lektor deploy ci --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} |