From b37715dd1f9650a785aa2c4b9dac35002666caec Mon Sep 17 00:00:00 2001 From: Andre Nogueira Date: Mon, 25 May 2026 16:25:01 +0100 Subject: [PATCH] ci: deploy blog to GitHub Pages on push to main Adds a workflow that builds the SvelteKit site with bun and publishes it to GitHub Pages. A CNAME file pins the apex domain techquests.dev so the deploy artifact preserves it across runs. SvelteKit's adapter-static copies static/ to build/ unchanged, so static/CNAME ends up at build/CNAME for the Pages artifact. Signed-off-by: Andre Nogueira --- .github/workflows/deploy-pages.yml | 47 ++++++++++++++++++++++++++++++ static/CNAME | 1 + 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/deploy-pages.yml create mode 100644 static/CNAME diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 0000000..a533257 --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,47 @@ +name: Deploy Pages + +on: + push: + branches: [main] + 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 + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + - name: Install dependencies + run: | + if [ -f bun.lock ]; then + bun install --frozen-lockfile + else + bun install + fi + - name: Build + run: bun run build + - uses: actions/configure-pages@v5 + - uses: actions/upload-pages-artifact@v3 + with: + path: build + + 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/static/CNAME b/static/CNAME new file mode 100644 index 0000000..0869ac5 --- /dev/null +++ b/static/CNAME @@ -0,0 +1 @@ +techquests.dev