Skip to content

Commit

Permalink
更新workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Suoerix committed Feb 2, 2024
1 parent 9083421 commit 2e9fc40
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: docs

name: deploy vuepress

on:
# 每当 push 到 main 分支时触发部署
push:
branches: [main]
# 手动触发部署
Expand Down Expand Up @@ -42,16 +42,14 @@ jobs:
# 运行构建脚本
- name: Build VuePress site
run: yarn docs:build

# 查看 workflow 的文档来获取更多信息
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2

# 上传至阿里云oss
- name: upload files to OSS
uses: fangbinwei/aliyun-oss-website-action@v1
with:
# 部署到 gh-pages 分支
target_branch: gh-pages
# 部署目录为 VuePress 的默认输出目录
build_dir: docs/.vuepress/dist
env:
# @see https://docs.github.com/cn/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
accessKeyId: ${{ secrets.ACCESS_KEY_ID }}
accessKeySecret: ${{ secrets.ACCESS_KEY_SECRET }}
bucket: "your-bucket-name"
endpoint: "oss-cn-shanghai.aliyuncs.com"
cname: true
folder: "docs/.vuepress/dist"

0 comments on commit 2e9fc40

Please sign in to comment.