From a9e3d0d45027defecc029a6aea1aae60fd83ef64 Mon Sep 17 00:00:00 2001 From: Lordiii Date: Tue, 5 Mar 2024 11:42:53 +0100 Subject: [PATCH] Define Github Pages Action --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 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 0000000..cd85778 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +on: push +jobs: + build: + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/main' + steps: + - name: 'checkout' + uses: actions/checkout@v4 + - name: 'build' + uses: shalzz/zola-deploy-action@v0.17.2 + env: + PAGES_BRANCH: gh-pages + BUILD_DIR: . + TOKEN: ${{ secrets.TOKEN }} + # BUILD_ONLY: true + build_and_deploy: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + steps: + - name: 'checkout' + uses: actions/checkout@v4 + - name: 'build and deploy' + uses: shalzz/zola-deploy-action@v0.17.2 + env: + PAGES_BRANCH: master + BUILD_DIR: . + TOKEN: ${{ secrets.TOKEN }} + REPOSITORY: ${{ secrets.GHP_USER }}/${{ secrets.GHP_USER }}.github.io