Scrape json Data #1073
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: Scrape json Data | |
on: | |
push: | |
paths-ignore: | |
- '**' | |
schedule: # Ref https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
- cron: '50 * * * *' # Ref https://crontab.guru/examples.html | |
env: | |
BRANCH_NAME: 'main' | |
TIMEZONE: 'Europe/Moscow' # Optional | |
jobs: | |
deploy_and_scrape: | |
name: Scrape | |
permissions: # Ref https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs | |
contents: write | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
if: contains( github.ref, 'refs/heads/main' ) || contains( github.ref, 'refs/heads/master' ) | |
steps: | |
- uses: actions/checkout@main | |
- name: Build on ${{ github.ref_name }} | |
run: npm install | |
- name: Run scrape script | |
run: npm run update-roi | |
env: | |
PATHWAY_SAVE: /data/roi | |
- uses: corcc/publish@master | |
env: | |
TASK_NAME: 'Data query:' | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub sets this for you |