From 77fd670f7fc3154414d5f7ee498734034a4833bb Mon Sep 17 00:00:00 2001 From: Alain Siegrist Date: Sat, 16 Dec 2023 16:25:39 +0100 Subject: [PATCH] Add github pages CI --- .github/workflows/build.yml | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b61b70d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Build and deploy site +on: + push: + branches: + - main + paths-ignore: + - '.github/ISSUE_TEMPLATE/**' + - '.github/PULL_REQUEST_TEMPLATE.md' + - '.gitignore' + - 'README.md' +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: taiki-e/install-action@v2 + with: + tool: zola@0.17.2 + - name: Build site + run: zola build + - name: Fix permissions + run: | + chmod -c -R +rX "public/" + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v2 + with: + path: "public/" + deploy: + needs: build + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v3