Skip to content

Commit

Permalink
Update deploy-docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
znc15 authored Sep 24, 2023
1 parent 18c838a commit 4026c02
Showing 1 changed file with 17 additions and 25 deletions.
42 changes: 17 additions & 25 deletions .github/workflows/deploy-docs.yml
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

0 comments on commit 4026c02

Please sign in to comment.