Skip to content

Commit 277ad93

Browse files
committed
Add GH-pages workflow
1 parent 90bad31 commit 277ad93

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [ master, main, 'v*' ]
6+
7+
concurrency:
8+
group: gh-pages-${{ github.head_ref || github.ref }}
9+
cancel-in-progress: true
10+
11+
12+
jobs:
13+
# Build job
14+
build:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 10
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: pnpm/action-setup@v4
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: 18
23+
cache: 'pnpm'
24+
- run: pnpm install
25+
- run: cd docs-app && pnpm docs:build
26+
27+
- name: Upload static files as artifact
28+
id: deployment
29+
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
30+
with:
31+
path: docs-app/dist
32+
33+
deploy:
34+
needs: build
35+
36+
permissions:
37+
pages: write # to deploy to Pages
38+
id-token: write # to verify the deployment originates from an appropriate source
39+
40+
# Deploy to the github-pages environment
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
45+
# Specify runner + deployment step
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action

0 commit comments

Comments
 (0)