AUTH_TOKEN added to .env.example
#2
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: π Deploy | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
actions: write | |
contents: read | |
jobs: | |
lint: | |
name: ⬣ ESLint | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
- name: π Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: π₯ Download deps | |
run: bun install --frozenLockfile | |
- name: π¬ Lint | |
run: bun lint | |
typecheck: | |
name: Κ¦ TypeScript | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
- name: π Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: π₯ Download deps | |
run: bun install --frozenLockfile | |
- name: π Type check | |
run: bun typecheck | |
playwright: | |
name: π Playwright | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 60 | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
- name: π Copy test env vars | |
run: cp .env.example .env | |
- name: π Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: π₯ Download deps | |
run: bun install --frozenLockfile | |
- name: π₯ Install Playwright Browsers | |
run: bun test:e2e:install | |
- name: π Playwright tests | |
run: bunx playwright test | |
- name: π Upload report | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
deploy: | |
name: π Deploy | |
runs-on: ubuntu-22.04 | |
needs: [lint, typecheck, playwright] | |
# only build/deploy branches on pushes | |
if: ${{ github.event_name == 'push' }} | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
- name: π Read app name | |
uses: SebRollen/[email protected] | |
id: app_name | |
with: | |
file: 'fly.toml' | |
field: 'app' | |
- name: π Setup Fly | |
uses: superfly/flyctl-actions/[email protected] | |
- name: π Deploy | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: | |
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |