Skip to content

Commit 7f084f4

Browse files
committed
Add GitHub Pages workflow to deploy docs
Introduce .github/workflows/deploy-docs.yml to build the site with Astro and deploy to GitHub Pages. The workflow runs on push to the temporary branch `gh-pages-action` (TODO: switch back to `main` after verification) and supports manual dispatch. It grants minimal permissions for pages deployment, enforces concurrency to avoid overlapping runs, builds the `docs` site using withastro/action, and deploys via actions/deploy-pages@v5.
1 parent c2254e9 commit 7f084f4

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [gh-pages-action] # TODO: switch back to [main] once verified
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
# Allow one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v5
24+
- name: Build with Astro
25+
uses: withastro/action@v6
26+
with:
27+
path: docs
28+
29+
deploy:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
environment:
33+
name: github-pages
34+
url: ${{ steps.deployment.outputs.page_url }}
35+
steps:
36+
- name: Deploy to GitHub Pages
37+
id: deployment
38+
uses: actions/deploy-pages@v5

0 commit comments

Comments
 (0)