name: CI on: push: branches: [main] paths: - "**.ts" - "**.lock" - "**.nix" - "deno.json" - ".github/wokrflows/ci.yaml" pull_request: paths: - "**.ts" - "**.lock" - "**.nix" - "deno.json" - ".github/wokrflows/ci.yaml" workflow_dispatch: jobs: lint-and-format: name: Lint & Format runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Install Nix uses: DeterminateSystems/nix-installer-action@v14 - name: Run deno lint run: nix develop .#ci --command deno lint - name: Run treefmt run: nix fmt -- --ci deploy: name: Deploy needs: lint-and-format runs-on: ubuntu-latest permissions: id-token: write steps: - name: Clone repository uses: actions/checkout@v4 - name: Upload to Deno Deploy uses: denoland/deployctl@v1 with: project: teawie-api entrypoint: main.ts include: | main.ts lib deno.json deno.lock