From 3ad6083d81aa4390711fdb0bfbb4d06d5bbc0f2c Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sat, 27 Jan 2024 22:42:55 +0200 Subject: [PATCH] Add github actions, minify output --- .github/workflows/main.yml | 29 +++++++++++++++++++++++++++++ .woodpecker.yml | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) 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..73298ff --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +name: Hugo +on: [push] +permissions: + contents: read + pages: write + id-token: write +jobs: + build: + runs-on: git.korhonen.cc/functionalhacker/hugo-asciidoc-docker-ci:latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - run: npm install + - run: hugo --gc --minify --cleanDestinationDir -d /korhonen.cc + + deploy: + runs-on: ubuntu-latest + needs: build + steps: + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: './public' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} diff --git a/.woodpecker.yml b/.woodpecker.yml index 63c74fc..dc37b37 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,7 +3,7 @@ steps: image: git.korhonen.cc/functionalhacker/hugo-asciidoc-docker-ci:latest commands: - npm install - - hugo --gc --cleanDestinationDir -d /korhonen.cc + - hugo --gc --minify --cleanDestinationDir -d /korhonen.cc volumes: - /var/www/korhonen.cc:/korhonen.cc environment: