Add github actions, minify output
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Marko Korhonen 2024-01-27 22:42:55 +02:00
parent 05b1d9836f
commit 3ad6083d81
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890
2 changed files with 30 additions and 1 deletions

29
.github/workflows/main.yml vendored Normal file
View file

@ -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 }}

View file

@ -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: