Flat #1241
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: Flat | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Setup deno | |
uses: denoland/setup-deno@v2.0.0 | |
# we use setup-node because it will automatically cache our NPM modules | |
- name: Cache NPM modules | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Deno Install | |
run: deno install | |
- name: Fetch | |
run: deno run --config ./deno.json --allow-write=./data.html --allow-net=transpordiamet.ee ./fetch.ts | |
- name: Parse | |
run: deno run --config ./deno.json --allow-read=./data.html --allow-write=./data.json --allow-env ./parse.ts | |
- name: Commit & Push | |
uses: actions-js/push@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: main | |
force: true |