-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,14 @@ jobs: | |
run: | | ||
npm run docs:build | ||
zip -r vuepress ./vuepress/** | ||
# 部署到 GitHub Pages | ||
- name: Deploy to GitHub Pages | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages # 要部署到的分支 | ||
folder: vuepress # 构建产物的文件夹 | ||
clean: true # 清除 gh-pages 分支上的旧文件 | ||
# 产物上传服务器 | ||
# - name: Upload to Deploy Server | ||
# uses: easingthemes/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,11 +16,14 @@ git init | |
git add -A | ||
git commit -m 'deploy' | ||
|
||
# Create and switch to the main branch | ||
git branch -M main | ||
|
||
# if you are deploying to https://<USERNAME>.github.io | ||
# git push -f [email protected]:<USERNAME>/<USERNAME>.github.io.git master | ||
|
||
# if you are deploying to https://<USERNAME>.github.io/<REPO> | ||
git push -f https://github.com/joywins-y/blog-docs.git main:gh-pages | ||
git push -f git@github.com:joywins-y/blog-docs.git main:gh-pages | ||
|
||
|
||
|
||
|