Skip to content

testing cancel

testing cancel #65

Workflow file for this run

name: πŸš€ Deploy
on:
push:
branches:
- main
- dev
pull_request: {}
permissions:
actions: write
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: ⬣ Biome Check
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
node-version: 22
- name: πŸ“₯ Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.6.0
- name: πŸ“₯ Download deps
run: pnpm install --frozen-lockfile
- name: Setup Biome
uses: biomejs/[email protected]
with:
version: 1.8.3
- name: πŸ”¬ Lint
run: pnpm check
typecheck:
name: Κ¦ TypeScript
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
node-version: 22
- name: πŸ“₯ Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.6.0
- name: πŸ“₯ Download deps
run: pnpm install --frozen-lockfile
- name: πŸ”Ž Type check
run: pnpm run typecheck
deploy:
name: πŸš€ Deploy
runs-on: ubuntu-22.04
needs: [lint, typecheck]
# only build/deploy main branch on pushes
if:
${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') &&
github.event_name == 'push' }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: πŸ‘€ Read app name
uses: SebRollen/[email protected]
id: app_name
with:
file: 'fly.toml'
field: 'app'
- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@master
- name: πŸš€ Deploy Staging
if: ${{ github.ref == 'refs/heads/dev' }}
run:
flyctl deploy --build-arg COMMIT_SHA=${{ github.sha }}
--app ${{ steps.app_name.outputs.value }}-staging
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: πŸš€ Deploy Production
if: ${{ github.ref == 'refs/heads/main' }}
run: flyctl deploy --build-arg COMMIT_SHA=${{ github.sha }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}