Skip to content

Commit 55c0af2

Browse files
authored
Update deploy.yml
1 parent 461443e commit 55c0af2

1 file changed

Lines changed: 43 additions & 53 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 43 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,52 @@
11
name: Deploy VitePress site to Pages
22

33
on:
4-
push:
5-
branches: [ master ]
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
67

7-
# Allows you to run this workflow manually from the Actions tab
8-
workflow_dispatch:
9-
10-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
118
permissions:
12-
contents: read
13-
pages: write
14-
id-token: write
9+
contents: read
10+
pages: write
11+
id-token: write
1512

16-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
1813
concurrency:
19-
group: pages
20-
cancel-in-progress: false
14+
group: "pages"
15+
cancel-in-progress: false
2116

2217
jobs:
23-
# Build job
24-
build:
25-
runs-on: ubuntu-latest
26-
steps:
27-
- name: Checkout
28-
uses: actions/checkout@v3
29-
with:
30-
fetch-depth: 0 # Not needed if lastUpdated is not enabled
31-
# - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm
32-
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
33-
- name: Setup Node
34-
uses: actions/setup-node@v3
35-
with:
36-
node-version: 18
37-
cache: npm # or pnpm / yarn
38-
- name: Setup Pages
39-
uses: actions/configure-pages@v3
40-
- name: Install dependencies
41-
run: npm ci # or pnpm install / yarn install / bun install
42-
- name: Build with VitePress
43-
run: |
44-
npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
45-
touch docs/.vitepress/dist/.nojekyll
46-
- name: Upload artifact
47-
uses: actions/upload-pages-artifact@v2
48-
with:
49-
path: docs/.vitepress/dist
50-
51-
# Deployment job
52-
deploy:
53-
environment:
54-
name: github-pages
55-
url: ${{ steps.deployment.outputs.page_url }}
56-
needs: build
57-
runs-on: ubuntu-latest
58-
name: Deploy
59-
steps:
60-
- name: Deploy to GitHub Pages
61-
id: deployment
62-
uses: actions/deploy-pages@v2
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 18
28+
cache: npm
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build with VitePress
34+
run: |
35+
npm run docs:build
36+
touch docs/.vitepress/dist/.nojekyll
37+
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: docs/.vitepress/dist
42+
43+
deploy:
44+
needs: build
45+
runs-on: ubuntu-latest
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)