Skip to content
This repository was archived by the owner on Aug 8, 2022. It is now read-only.

Commit

Permalink
deploy: use github actions script deploy gh-pages
Browse files Browse the repository at this point in the history
veaba committed Sep 5, 2020
1 parent 82369c4 commit 24a7f81
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -12,23 +12,24 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: 步骤:第一步 -> 设置环境
- name: 1. set environment
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: 步骤:第二步 -> 安装依赖
- name: 2. install dep
run: |
rm -rf node_modules
npm install
npm run build
env:
CI: true

- name: 步骤:第三步 -> 部署脚本
- name: 3. script deploy
env:
ACCESS_TOKEN_DEPLOY: ${{secrets.ACTIONS_ACCESS_TOKEN_VUE_DOCS_CI }}
ACCESS_TOKEN_DEPLOY: ${{secrets.VUE_DOCS_ZH_CN_TOKEN}}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./src/.vuepress/dist
CNAME: cn.v3.vuejs.org
CNAME: v3.cn.vuejs.org
run: |
chmod +x ./scripts/deploy.sh
bash ./scripts/deploy.sh
2 changes: 1 addition & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -78,4 +78,4 @@ git commit -m "【Deployment success】:${push_time}"

git push origin -f "${PUBLISH_BRANCH}"

print_info "${GITHUB_SHA} 漂亮!部署成功${push_time}"
print_info "${GITHUB_SHA} deploy successful${push_time}"

0 comments on commit 24a7f81

Please sign in to comment.