-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 changed file
with
17 additions
and
25 deletions.
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 |
---|---|---|
@@ -1,25 +1,17 @@ | ||
#!/usr/bin/env sh | ||
|
||
# 确保脚本抛出遇到的错误 | ||
set -e | ||
|
||
# 生成静态文件 | ||
pnpm docs:build | ||
|
||
# 进入生成的文件夹 | ||
cd docs/.vuepress/dist | ||
|
||
# 如果是发布到自定义域名 | ||
# echo 'www.example.com' > CNAME | ||
|
||
git init | ||
git add -A | ||
git commit -m 'deploy' | ||
|
||
# 如果发布到 https://<USERNAME>.github.io | ||
git push -f git@github.com:lms-work.github.io.git master | ||
|
||
# 如果发布到 https://<USERNAME>.github.io/<REPO> | ||
# git push -f git@github.com:<USERNAME>/<REPO>.git master:gh-pages | ||
|
||
cd - | ||
name: Build and Deploy | ||
on: [push] | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: vuepress-deploy | ||
uses: jenkey2011/vuepress-deploy@master | ||
env: | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
TARGET_REPO: lms-work/wiki-docs | ||
TARGET_BRANCH: master | ||
BUILD_SCRIPT: yarn && yarn docs:build | ||
BUILD_DIR: src/.vuepress/dist |