Skip to content
本页目录

vitepress 部署github pages

官方教程

配置 ACCESS_TOKEN

  • 账号 => settings => Developer settings => personal access tokens => tokens(classic) => Generate new token

  • 拿到 token后, 仓库设置 => secrete and veriables => actions => new repository secret = > 添加name为 ACCESS_TOKEN

Actions 配置文件

yaml
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: username/repo
        TARGET_BRANCH: master
        BUILD_SCRIPT: yarn && yarn docs:build
        BUILD_DIR: docs/.vuepress/dist
        CNAME: https://www.xxx.com
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18