From 52df8db3ade548a35d478b35a7eda12f1c978c23 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Wed, 30 Apr 2025 16:54:34 -0400 Subject: [PATCH] fix workflows --- .github/workflows/build.yml | 48 ------------------------------------ .github/workflows/deploy.yml | 5 ++++ .github/workflows/pr.yml | 35 ++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 48 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 91e3a6a..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages - -on: - # Runs on pushes targeting the default branch - pull_request: - branches: ['main'] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: 'pages' - cancel-in-progress: false - -jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v5 - - uses: oven-sh/setup-bun@v2 - - name: Install - run: bun install - - name: Build - run: bun run build - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload entire repository - path: './dist' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 452f32e..b26e9eb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,6 +5,11 @@ on: push: branches: - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + jobs: install: name: Install diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..45d1dd3 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,35 @@ +name: PR Gate + +on: + pull_request: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + checks: + name: Checks + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Bun Setup + uses: oven-sh/setup-bun@v2 + with: + bun-version-file: '.tool-versions' + - name: Install + run: bun install + - name: Lint + run: bun lint + - name: Build + run: bun run build + - name: Svelte Check + run: bun check + - name: Test + run: bun run test:unit