Tide Timings Scrape & Deploy #27
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: Tide Timings Scrape & Deploy | |
on: | |
schedule: | |
# Runs at 8:20AM UTC, on 1st day of each month. | |
# = at 4:20PM SGT, on 1st day of each month. | |
- cron: '20 8 1 * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codes | |
uses: actions/checkout@v3 | |
- name: Checkout current gh-pages branch | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
path: ./results | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- name: Get dependencies | |
run: npm ci | |
- name: Generate files | |
run: npm run actions | |
- name: Deploy results | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./results | |