diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..f35cbbf --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,28 @@ +name: Deploy pages + +on: [push] + +jobs: + deploy-site-page: + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + extended: true + + - name: Build + run: hugo -b https://gaoxh.github.io/ -d ./output + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./output + publish_branch: main + destination_dir: ./output + keep_files: true