Skip to content

Commit 4970953

Browse files
committed
add workflow docs
1 parent d8a6fd4 commit 4970953

41 files changed

Lines changed: 312 additions & 127 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

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

35
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.
48
push:
5-
branches:
6-
- main
7-
# Review gh actions docs if you want to further define triggers, paths, etc
8-
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
9+
branches: [main]
910

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
1015
permissions:
11-
contents: write
16+
contents: read
17+
pages: write
18+
id-token: write
19+
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.
22+
concurrency:
23+
group: pages
24+
cancel-in-progress: false
1225

1326
jobs:
14-
deploy:
15-
name: Deploy to GitHub Pages
27+
# Build job
28+
build:
1629
runs-on: ubuntu-latest
1730
steps:
18-
- uses: actions/checkout@v4
31+
- name: Checkout
32+
uses: actions/checkout@v4
1933
with:
20-
fetch-depth: 0
21-
- uses: actions/setup-node@v4
34+
fetch-depth: 0 # Not needed if lastUpdated is not enabled
35+
# - uses: pnpm/action-setup@v3 # Uncomment this block if you're using pnpm
36+
# with:
37+
# version: 9 # Not needed if you've set "packageManager" in package.json
38+
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
39+
- name: Setup Node
40+
uses: actions/setup-node@v4
2241
with:
23-
node-version: 18
24-
cache: npm
25-
42+
node-version: 20
43+
cache: npm # or pnpm / yarn
44+
- name: Setup Pages
45+
uses: actions/configure-pages@v4
2646
- name: Install dependencies
27-
run: |
28-
npm install --package-lock-only
29-
npm ci
30-
31-
- name: Build website
32-
run: npm run build
47+
run: npm ci # or pnpm install / yarn install / bun install
48+
- name: Build with VitePress
49+
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v3
52+
with:
53+
path: docs/.vitepress/dist
3354

34-
# Popular action to deploy to GitHub Pages:
35-
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
55+
# Deployment job
56+
deploy:
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
needs: build
61+
runs-on: ubuntu-latest
62+
name: Deploy
63+
steps:
3664
- name: Deploy to GitHub Pages
37-
uses: peaceiris/actions-gh-pages@v3
38-
with:
39-
github_token: ${{ secrets.GITHUB_TOKEN }}
40-
# Build output to publish to the `gh-pages` branch:
41-
publish_dir: ./build
42-
# The following lines assign commit authorship to the official
43-
# GH-Actions bot for deploys to `gh-pages` branch:
44-
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
45-
# The GH actions bot is used by default if you didn't specify the two fields.
46-
# You can swap them out with your own user credentials.
47-
user_name: github-actions[bot]
48-
user_email: 41898282+github-actions[bot]@users.noreply.github.com
65+
id: deployment
66+
uses: actions/deploy-pages@v4

docs/.vitepress/.vite/deps_temp_602808c9/package.json

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
{
2-
"hash": "993891a5",
2+
"hash": "08ee2894",
33
"configHash": "3c81eeac",
4-
"lockfileHash": "0929e04c",
5-
"browserHash": "fb3b1067",
4+
"lockfileHash": "667581f9",
5+
"browserHash": "559a6195",
66
"optimized": {
77
"vue": {
88
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
99
"file": "vue.js",
10-
"fileHash": "071275e2",
10+
"fileHash": "8a17a759",
1111
"needsInterop": false
1212
},
1313
"vitepress > @vue/devtools-api": {
1414
"src": "../../../../node_modules/@vue/devtools-api/dist/index.js",
1515
"file": "vitepress___@vue_devtools-api.js",
16-
"fileHash": "d96085e2",
16+
"fileHash": "f7885ad9",
1717
"needsInterop": false
1818
},
1919
"vitepress > @vueuse/core": {
2020
"src": "../../../../node_modules/@vueuse/core/index.mjs",
2121
"file": "vitepress___@vueuse_core.js",
22-
"fileHash": "472e339b",
22+
"fileHash": "5e29fc71",
2323
"needsInterop": false
2424
},
2525
"vitepress > @vueuse/integrations/useFocusTrap": {
2626
"src": "../../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
2727
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
28-
"fileHash": "6a53f878",
28+
"fileHash": "f37b9607",
2929
"needsInterop": false
3030
},
3131
"vitepress > mark.js/src/vanilla.js": {
3232
"src": "../../../../node_modules/mark.js/src/vanilla.js",
3333
"file": "vitepress___mark__js_src_vanilla__js.js",
34-
"fileHash": "14f77783",
34+
"fileHash": "77710abf",
3535
"needsInterop": false
3636
},
3737
"vitepress > minisearch": {
3838
"src": "../../../../node_modules/minisearch/dist/es/index.js",
3939
"file": "vitepress___minisearch.js",
40-
"fileHash": "45d322fb",
40+
"fileHash": "ac560321",
4141
"needsInterop": false
4242
},
4343
"@theme/index": {
4444
"src": "../../../../node_modules/vitepress/dist/client/theme-default/index.js",
4545
"file": "@theme_index.js",
46-
"fileHash": "8c0ee544",
46+
"fileHash": "4f1eae3c",
4747
"needsInterop": false
4848
}
4949
},
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)