1+ # Sample workflow for building and deploying a VitePress site to GitHub Pages
2+ #
3+ name : Prerelease
4+
5+ on :
6+ # Runs on pushes targeting the `main` branch. Change this to `master` if you're
7+ # using the `master` branch as the default branch.
8+ push :
9+ branches : [beta]
10+
11+ # Allows you to run this workflow manually from the Actions tab
12+ workflow_dispatch :
13+
14+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15+ permissions :
16+ contents : write
17+ pages : write
18+ id-token : write
19+ pull-requests : write
20+ packages : write
21+
22+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
23+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
24+ concurrency :
25+ group : pages
26+ cancel-in-progress : false
27+
28+ jobs :
29+ # Build job
30+ build :
31+ runs-on : ubuntu-latest
32+ steps :
33+ - name : Checkout
34+ uses : actions/checkout@v4
35+ with :
36+ fetch-depth : 0
37+ - uses : pnpm/action-setup@v3
38+ - name : Setup Node
39+ uses : actions/setup-node@v4
40+ with :
41+ node-version : 22
42+ cache : pnpm
43+ - name : Setup Pages
44+ uses : actions/configure-pages@v4
45+ - name : Install dependencies
46+ run : pnpm install --frozen-lockfile
47+ - name : Build
48+ run : pnpm build
49+ - name : Upload artifact
50+ uses : actions/upload-pages-artifact@v3
51+ with :
52+ path : docs/.vitepress/dist
53+ - name : Create Release Pull Request or Publish
54+ id : changesets
55+ uses : changesets/action@v1
56+ with :
57+ commit : " ci: version bump from changesets"
58+ publish : pnpm changeset publish
59+ env :
60+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
62+
63+ # Deployment job
64+ deploy :
65+ environment :
66+ name : github-pages
67+ url : ${{ steps.deployment.outputs.page_url }}
68+ needs : build
69+ runs-on : ubuntu-latest
70+ name : Deploy
71+ steps :
72+ - name : Deploy to GitHub Pages
73+ id : deployment
74+ uses : actions/deploy-pages@v4
0 commit comments