File tree Expand file tree Collapse file tree 1 file changed +39
-10
lines changed
Expand file tree Collapse file tree 1 file changed +39
-10
lines changed Original file line number Diff line number Diff line change @@ -33,17 +33,46 @@ jobs:
3333 cd docs
3434 npm run docs:build
3535
36- - name : Deploy to GitHub Pages
36+ name : Deploy Docs to GitHub Pages
37+
38+ on :
39+ push :
40+ branches :
41+ - main
42+ - feat/docs
43+ paths :
44+ - ' docs/**'
45+ - ' .github/workflows/deploy-docs.yaml'
46+ workflow_dispatch :
47+
48+ jobs :
49+ deploy :
50+ runs-on : ubuntu-latest
51+ steps :
52+ - name : Checkout repository
53+ uses : actions/checkout@v4
54+
55+ - name : Setup Node.js
56+ uses : actions/setup-node@v4
57+ with :
58+ node-version : ' 22'
59+
60+ - name : Install dependencies
3761 run : |
38- cd docs/docs/.vuepress/dist
62+ cd docs
63+ npm install
3964
40- git init
41- git config user.name "GitHub Actions"
42- git config user.email "[email protected] " 65+ - name : Build documentation
66+ run : |
67+ cd docs
68+ npm run docs:build
4369
44- git add .
45- git commit -m "Deploy docs from ${{ github.sha }}"
70+ - name : Upload artifact for GitHub Pages
71+ uses : actions/upload-pages-artifact@v3
72+ with :
73+ path : docs/docs/.vuepress/dist
4674
47- git push --force --quiet \
48- "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" \
49- HEAD:docs
75+ - name : Deploy to GitHub Pages
76+ id : deploy
77+ uses : actions/deploy-pages@v4
78+
You can’t perform that action at this time.
0 commit comments