diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index d2329b4..9cb4890 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -7,15 +7,23 @@ on: jobs: deploy: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: npm install - # 文档编译命令,如果是 react 模板需要修改为 npm run docs:build - - run: npm run docs:build + - name: Checkout + uses: actions/checkout@v3 + with: + # 如果配置 themeConfig.lastUpdated 为 false,则不需要添加该参数以加快检出速度 + fetch-depth: 0 + - name: Install dependencies + run: npm install + - name: Build with dumi + # 文档编译命令,如果是 react 模板需要修改为 npm run docs:build + run: npm run docs:build - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.ACCESS_TOKEN }} + user_name: ${{ secrets.MY_USER_NAME }} + user_email: ${{ secrets.MY_USER_EMAIL }} # 文档目录,如果是 react 模板需要修改为 docs-dist publish_dir: ./docs-dist