From 544a0f0ce4f40077dfdaaf41e0a099b22dabfcb2 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Sat, 2 Aug 2025 23:41:19 +0200 Subject: [PATCH] Create workflow for Github Pages --- .github/workflows/deploy.yml | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..193e3b1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,43 @@ +name: Deploy to Github Pages + +on: + push: + branches: ["master"] + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: 0.146.7 + extended: true + - name: Run Hugo + working-directory: exampleSite + run: hugo --minify + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'exampleSite/public' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4