Build, Run & Deploy #2022
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: Build, Run & Deploy | |
on: | |
schedule: | |
- cron: "0 23,17,11,5 * * *" # Runs at 9am (daylight savings or 10 am non-daylight savings). | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Rust Build & Run | |
uses: actions/checkout@v2 | |
- name: Make env | |
uses: SpicyPizza/create-envfile@v1.3 | |
with: | |
envkey_ORG_KEY: ${{ secrets.ORG_KEY }} | |
envkey_DW_KEY: ${{ secrets.DW_KEY }} | |
envkey_AWS_ORG_KEY: ${{ secrets.AWS_ORG_KEY }} | |
- run: sudo timedatectl set-timezone Australia/Sydney | |
- run: cargo run | |
- name: Make PDF Report | |
uses: xu-cheng/latex-action@v2 | |
with: | |
working_directory: page/pdf/src | |
root_file: report.tex | |
- name: Upload PDF Report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: clyde-water-quality-report.pdf | |
path: page/pdf/src/report.pdf | |
- name: Deploy GH Pages | |
uses: JamesIves/github-pages-deploy-action@4.1.7 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: page # The folder the action should deploy. |