From 427d1432b349f06ca5ac2996b0affa6c9dc9a19d Mon Sep 17 00:00:00 2001 From: leonGravel Date: Wed, 21 Aug 2019 21:25:14 +0800 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..eeb09ab9 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,23 @@ +name: Main workflow + +on: + push: + branches: + - hugo + +jobs: + build-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@hugo + - name: build + uses: peaceiris/actions-hugo@v0.57.2 + with: + args: --gc --minify --cleanDestinationDir + - name: deploy + uses: peaceiris/actions-gh-pages@v1.1.0 + if: contains(github.ref, 'master') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_BRANCH: master + PUBLISH_DIR: ./public