diff options
author | Go <monkeywzr@gmail.com> | 2021-07-04 12:23:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 12:23:47 +0300 |
commit | 8a0766c543cff8c6e75a29acd93efd7902968398 (patch) | |
tree | 414c64bf83347c93b31645ff3ef9177a60b0fe87 | |
parent | 22c01ee971d31806bf478849176b31d847936550 (diff) | |
parent | 69c539ce31120cd036d25ea0bce497db8de4bb54 (diff) |
Merge pull request #69 from monkeyWzr/monkeyWzr-patch-1
Create gh-pages.yml
-rw-r--r-- | .github/workflows/gh-pages.yml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..433c2be --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,32 @@ +name: github pages + +on: + push: + branches: + - main # Set a branch to deploy + pull_request: + +jobs: + deploy: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2.4.13 + with: + hugo-version: 'latest' + # extended: true + + - name: Build + run: hugo --minify + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3.7.3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public |