Deploy Pushup website to Fly.io #99
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: Deploy Pushup website to Fly.io | |
on: | |
workflow_run: | |
workflows: ["Build and test"] | |
types: | |
- completed | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
jobs: | |
deploy: | |
name: Deploy app | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
environment: pushup-website | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: Download Pushup executable | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
name: pushup-exe | |
workflow: go.yml | |
- name: Set Pushup exe perms | |
run: chmod +x pushup | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.18 | |
- name: Build the Pushup site | |
run: ../pushup build | |
working-directory: ./docs | |
- run: flyctl deploy --remote-only | |
working-directory: ./docs | |
on-failure: | |
if: ${{ github.event.workflow_run.conclusion == 'failure' }} | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "Not building Pushup website due to failure of build/test workflow" |