From a1455f4ec2e3789accab249670e9d369d58343be Mon Sep 17 00:00:00 2001 From: Andre Nogueira Date: Mon, 25 May 2026 16:00:47 +0100 Subject: [PATCH] ci: deploy website to GitHub Pages on push to main Adds a workflow that builds the Astro/Starlight site with bun (including pagefind) and deploys it to GitHub Pages. A CNAME file pins the custom domain code-search.techquests.dev so the deploy artifact preserves it across runs. Signed-off-by: Andre Nogueira --- .github/workflows/deploy-website.yml | 45 ++++++++++++++++++++++++++++ website/public/CNAME | 1 + 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/deploy-website.yml create mode 100644 website/public/CNAME diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml new file mode 100644 index 0000000..4e877cb --- /dev/null +++ b/.github/workflows/deploy-website.yml @@ -0,0 +1,45 @@ +name: Deploy Website + +on: + push: + branches: [main] + paths: + - 'website/**' + - '.github/workflows/deploy-website.yml' + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + lfs: true + - uses: oven-sh/setup-bun@v2 + - name: Install dependencies + run: cd website && bun install + - name: Build + run: cd website && bun run build + - uses: actions/configure-pages@v5 + - uses: actions/upload-pages-artifact@v3 + with: + path: website/dist + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/website/public/CNAME b/website/public/CNAME new file mode 100644 index 0000000..98c1394 --- /dev/null +++ b/website/public/CNAME @@ -0,0 +1 @@ +code-search.techquests.dev