Skip to content

feat: import

feat: import #22

Workflow file for this run

name: CI
on:
push:
branches: ['main']
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
name: πŸ’„ Lint
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: βŽ” Set up pnpm
uses: pnpm/action-setup@v3
with:
version: 9.5.0
- name: πŸ“₯ Download deps
run: pnpm install
- name: πŸ’„ Prettier Check
run: pnpm prettier:check
- name: πŸ”¬ Lint Check
run: pnpm lint:check
test:
name: πŸ§ͺ Tests
runs-on: blacksmith-2vcpu-ubuntu-2204
needs: [lint]
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: βŽ” Set up pnpm
uses: pnpm/action-setup@v3
with:
version: 9.5.0
- name: πŸ“₯ Download deps
run: |
pnpm install
pnpm run build
- name: πŸ„ Run the tests
run: pnpm test
deploy:
name: 🍿 Deploy
if: github.event_name == 'push' && ( github.ref_name == 'main' )
runs-on: blacksmith-2vcpu-ubuntu-2204
needs: [lint, test]
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: πŸ” Install Flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
- name: πŸš€ Push to Fly.io
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
run: flyctl deploy --remote-only --config fly-${{ github.ref_name }}.toml