diff options
author | Go <monkeywzr@gmail.com> | 2021-07-04 12:20:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 12:20:01 +0300 |
commit | 3fdf13a643b9edfa45a068dd28575b907ff54433 (patch) | |
tree | 99f8f65b0744e81eb3dae800d09056064a281de6 | |
parent | 22c01ee971d31806bf478849176b31d847936550 (diff) |
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..d92f91a --- /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 + 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 |