From 44b831a2e4c8073e449a4e1e4dfd477eb6e1acfc Mon Sep 17 00:00:00 2001 From: Milan Mladoniczky <6153201+tuplle@users.noreply.github.com> Date: Sun, 23 Feb 2025 21:36:33 +0100 Subject: [PATCH] add gh action for pages deployment --- .github/workflows/gh-pages.yaml | 68 +++++++++++++++++++++++++++++++++ CNAME | 1 + 2 files changed, 69 insertions(+) create mode 100644 .github/workflows/gh-pages.yaml create mode 100644 CNAME diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml new file mode 100644 index 0000000..403d991 --- /dev/null +++ b/.github/workflows/gh-pages.yaml @@ -0,0 +1,68 @@ +name: Deploy site to GitHub Pages + +on: + push: + branches: + - main + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +defaults: + run: + shell: bash + +jobs: + build: + runs-on: ubuntu-latest + env: + HUGO_VERSION: 0.143.1 + steps: + - name: Install Hugo + run: | + wget -O ${{ runner.temp }}/hugo.dev https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ + && sudo dpkg -i ${{ runner.temp }}/hugo.deb + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: '0' + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Install Node.js dependencies + run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" + - name: Hugo Build + env: + HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache + HUGO_ENVIRONMENT: production + TZ: Europe/Bratislava + run: | + hugo \ + --gc \ + --minify \ + --baseURL "${{ steps.pages.outputs.base_url }}/" + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './public' + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy on GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..ed059b2 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +dsa.interes.group