diff --git a/.github/workflows/zola.yml b/.github/workflows/zola.yml new file mode 100644 index 0000000..4219e26 --- /dev/null +++ b/.github/workflows/zola.yml @@ -0,0 +1,32 @@ +on: + push: + branches: + - master + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/master' + steps: + - name: 'Checkout' + uses: actions/checkout@master + - name: 'Build only' + uses: shalzz/zola-deploy-action@master + env: + BUILD_DIR: . + TOKEN: ${{ secrets.TOKEN }} + BUILD_ONLY: true + + build_and_deploy: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' + steps: + - name: 'Checkout' + uses: actions/checkout@master + - name: 'Build and deploy' + uses: shalzz/zola-deploy-action@master + env: + PAGES_BRANCH: gh-pages + BUILD_DIR: . + TOKEN: ${{ secrets.TOKEN }} \ No newline at end of file