Skip to content

Build, Run & Deploy #452

Build, Run & Deploy

Build, Run & Deploy #452

Workflow file for this run

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:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
container: bsefton/estuary_reports_ubuntu_python:latest
steps:
- name: Python Clone & Run
uses: actions/checkout@v2
- name: Make env
uses: SpicyPizza/create-envfile@v1.3
with:
envkey_DW_KEY: ${{ secrets.DW_KEY }}
envkey_CLYDE_ORG_KEY: ${{ secrets.CLYDE_ORG_KEY }}
envkey_PORT_STEPHENS_ORG_KEY: ${{ secrets.PORT_STEPHENS_ORG_KEY }}
envkey_WALLIS_LAKES_ORG_KEY: ${{ secrets.WALLIS_LAKES_ORG_KEY }}
envkey_MANNING_RIVER_ORG_KEY: ${{ secrets.MANNING_RIVER_ORG_KEY }}
- run: |
pwd
ls -a
cp .env src/.env
cd src
python3 main.py
- name: Upload PDF Report
uses: actions/upload-artifact@v2
with:
name: report.pdf
path: src/output/clyde/report/report.pdf
- name: Configure Git
run: |
git config --global --add safe.directory /__w/estuary-reports/estuary-reports
shell: bash
- name: Commit PDF Report
uses: EndBug/add-and-commit@v7
with:
author_name: "Ben Sefton"
author_email: "ben.sefton@dpi.nsw.gov.au"
message: "Add Clyde River PDF report"
add: "src/output/clyde/report/report.pdf"
push: "true"