join build and deploy in one workflow
Build and (eventually) deploy / Check if website builds (push) Successful in 43s Details
Build and (eventually) deploy / Deploy to Fly.io (push) Failing after 0s Details

Tudor Roman 2024-02-03 18:09:42 +01:00
parent 31537397d7
commit bc943d9a36
Signed by: tudor
SSH Key Fingerprint: SHA256:3CwS9plgXBecpXImPGxDIaSktUXBejbV/zerZMqzzBk
2 changed files with 14 additions and 19 deletions

View File

@ -1,4 +1,4 @@
name: Build
name: Build and (eventually) deploy
on:
pull_request:
push:
@ -24,3 +24,16 @@ jobs:
path: ${{ env.DENO_DIR }}
key: ${{ steps.createHash.outputs.hash }}
- run: nix run
deploy:
name: Deploy to Fly.io
needs: build
if: gitea.ref == "refs/heads/master"
runs-on: nix
concurrency: deploy-group
steps:
- uses: actions/checkout@v3
- name: Deploy!
run: nix run .#flyctl -- deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

View File

@ -1,18 +0,0 @@
name: Deploy
on:
workflow_run:
workflows: [Build]
types: [completed]
branches: [master]
jobs:
deploy:
name: Deploy to Fly.io
runs-on: nix
concurrency: deploy-group
steps:
- uses: actions/checkout@v3
- name: Deploy!
run: nix run .#flyctl -- deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}