Skip to content

Commit 5856b98

Browse files
committed
Add workflow to build and deploy pages
Signed-off-by: Nelo-T. Wallus <[email protected]>
1 parent c031e80 commit 5856b98

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/pages.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v5
24+
with:
25+
fetch-depth: 0
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
cache: npm
30+
- uses: actions/configure-pages@v4
31+
- run: npm ci
32+
- run: npm run build
33+
- uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: .vitepress/dist
36+
37+
deploy:
38+
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
39+
permissions:
40+
pages: write
41+
id-token: write
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
needs: build
46+
runs-on: ubuntu-latest
47+
name: deploy
48+
steps:
49+
- id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)