Repository navigation
Publish #283
This file contains hidden or 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: Publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| # Every hour, Monday through Friday | |
| - cron: '0 */1 * * 1-5' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1 | |
| with: | |
| egress-policy: audit | |
| disable-telemetry: true | |
| - name: Check out repo | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: Build and run review-rot | |
| run: | | |
| go build -o review-rot ./cmd/review-rot | |
| ./review-rot --config-dir=config --output=web/data.json | |
| env: | |
| GITHUB_PRIVATE_KEY: ${{ secrets.EC_AUTOMATION_KEY }} | |
| - name: Copy frontend files | |
| run: cp -r frontend/* web/ | |
| - name: Deploy to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@fa24774553152dd7873cd16ebd8d959b010c5445 # v4.9.0 | |
| with: | |
| folder: web | |
| branch: gh-pages | |
| git-config-name: "github-actions[bot]" | |
| git-config-email: "github-actions[bot]@users.noreply.github.com" |