.env.example #557
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: Fly Deploy | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
typecheck: | |
name: ʦ TypeScript | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
cache: npm | |
cache-dependency-path: ./package.json | |
node-version: 20.3.0 | |
- name: Install deps | |
run: npm install | |
- name: Generate types | |
run: npx prisma generate | |
- name: Type check | |
run: npm run typecheck --if-present | |
- name: Test | |
run: npm run test | |
deploy: | |
name: Deploy app | |
needs: [typecheck] | |
runs-on: ubuntu-latest | |
concurrency: deploy-group # optional: ensure only one action runs at a time | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: flyctl deploy --remote-only --build-arg SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |