Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Feb 13, 2024
1 parent 3e4ef1e commit ea401c5
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: validate
name: deploy

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
Expand All @@ -8,8 +13,6 @@ on:
- 'main'
jobs:
setup:
# ignore all-contributors PRs
if: ${{ !contains(github.head_ref, 'all-contributors') }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
Expand All @@ -23,8 +26,30 @@ jobs:
with:
node-version: 18

- name: npm 8
run: npm install --global npm@8

- name: ▶️ Run setup script
run: npm run setup

- name: ʦ TypeScript
run: npm run typecheck

- name: ⬣ ESLint
run: npm run lint

deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest
# only deploy main branch on pushes
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}

steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/[email protected]

- name: 🚀 Deploy
run: flyctl deploy --remote-only
working-directory: ./scripts/deployed
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

0 comments on commit ea401c5

Please sign in to comment.