Skip to content

Commit 0bd5f98

Browse files
committed
Update docs.yml
1 parent 42b0972 commit 0bd5f98

1 file changed

Lines changed: 24 additions & 24 deletions

File tree

.github/workflows/docs.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
1-
# Sample workflow for building and deploying a VitePress site to GitHub Pages
2-
#
3-
name: Deploy VitePress site to Pages
1+
name: Deploy docs
42

53
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.
4+
workflow_dispatch:
85
push:
96
branches: [main]
107

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
158
permissions:
169
contents: read
1710
pages: write
1811
id-token: write
1912

20-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2213
concurrency:
2314
group: pages
2415
cancel-in-progress: false
2516

2617
jobs:
27-
# Build job
2818
build:
2919
runs-on: ubuntu-latest
20+
defaults:
21+
run:
22+
working-directory: docs
23+
3024
steps:
3125
- name: Checkout
3226
uses: actions/checkout@v5
3327
with:
34-
fetch-depth: 0 # Not needed if lastUpdated is not enabled
35-
- uses: pnpm/action-setup@v4
28+
fetch-depth: 0
29+
30+
- name: Setup pnpm
31+
uses: pnpm/action-setup@v4
32+
with:
33+
version: latest
34+
run_install: false
35+
3636
- name: Setup Node
3737
uses: actions/setup-node@v6
3838
with:
3939
node-version: 24
4040
cache: pnpm
4141
cache-dependency-path: docs/pnpm-lock.yaml
42+
4243
- name: Setup Pages
4344
uses: actions/configure-pages@v4
45+
4446
- name: Install dependencies
4547
run: pnpm install --frozen-lockfile
46-
working-directory: docs
48+
4749
- name: Build with VitePress
4850
run: pnpm docs:build
49-
working-directory: docs
51+
5052
- name: Upload artifact
5153
uses: actions/upload-pages-artifact@v3
5254
with:
5355
path: docs/.vitepress/dist
5456

55-
# Deployment job
5657
deploy:
57-
environment:
58-
name: github-pages
59-
url: ${{ steps.deployment.outputs.page_url }}
60-
needs: build
6158
runs-on: ubuntu-latest
62-
name: Deploy
59+
needs: build
60+
permissions:
61+
pages: write
62+
id-token: write
63+
6364
steps:
6465
- name: Deploy to GitHub Pages
65-
id: deployment
66-
uses: actions/deploy-pages@v4
66+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)