Skip to content

Merge pull request #8 from gradedSystem/ga-actions-data #355

Merge pull request #8 from gradedSystem/ga-actions-data

Merge pull request #8 from gradedSystem/ga-actions-data #355

Workflow file for this run

on:
schedule:
- cron: '0 1 * * *'
push:
branches:
- main
jobs:
update:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@main
- name: Build the data and create local changes
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: x64
- name: Install requirements
run: |
pip install -r scripts/requirements.txt
- name: Run Make file
run: |
source venv/bin/activate
cd scripts
make
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git diff --quiet && git diff --staged --quiet || git commit -a -m "Auto-update of the data packages"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.gh }}
deploy:
needs: update
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '8.x'
- run: npm install -g data-cli
- run: data --version
- run: data push
env:
id: ${{secrets.dhid}}
username: ${{secrets.dhusername}}
token: ${{secrets.dhtoken}}