Skip to content

Commit

Permalink
sequence CI and Deploy actions better
Browse files Browse the repository at this point in the history
  • Loading branch information
Hayley Ashby committed Apr 16, 2024
1 parent 9409bd1 commit 9032011
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 41 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/CI and Deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI and Deploy

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
build:
name: Node.js CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: npm ci
- run: npm run build --if-present
- run: npm test

deploy:
name: Fly Deploy
needs: build
if: github.event_name == 'push'
runs-on: ubuntu-latest
concurrency: deploy-group
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
16 changes: 0 additions & 16 deletions .github/workflows/fly.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/node.js.yml

This file was deleted.

0 comments on commit 9032011

Please sign in to comment.