volcano #99
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main # Set a branch to deploy | |
| pull_request: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-22.04 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: '0.139.3' # 注意修改成你的hugo版本,以防兼容性错误 | |
| extended: true # 是否启用hugo extended | |
| - name: see workdir | |
| run: pwd && ls -a | |
| - name: Build | |
| run: ls -a && hugo --baseURL https://daidaij.github.io/ --minify | |
| working-directory: ./pandawo # 注意修改成你使用hugo创建的项目名称 | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v3 | |
| if: github.ref == 'refs/heads/main' | |
| with: | |
| PERSONAL_TOKEN: ${{ secrets.ACTION_TOKEN }} | |
| PUBLISH_DIR: ./pandawo/public # 注意修改成你使用hugo创建的项目名称 | |
| EXTERNAL_REPOSITORY: daidaiJ/daidaiJ.github.io # 你的Github Pages远程仓库名 | |
| # PUBLISH_BRANCH: master 如果不想推送到gh-pages分支,可以添加这一行 |