Unify github and forgejo workflows
All checks were successful
Build and deploy site / Build and deploy site (push) Successful in 1m1s
All checks were successful
Build and deploy site / Build and deploy site (push) Successful in 1m1s
This commit is contained in:
parent
9e3c7e08f5
commit
41349321ee
|
@ -9,7 +9,7 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: git.korhonen.cc/functionalhacker/hugo-asciidoc-docker-ci:latest
|
image: git.korhonen.cc/functionalhacker/hugo-asciidoc-docker-ci:latest
|
||||||
volumes:
|
volumes:
|
||||||
- caddy_korhonen_cc:/korhonen.cc
|
- caddy_korhonen_cc:/public
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
|
@ -1,33 +1,37 @@
|
||||||
name: Hugo
|
name: Build and deploy site
|
||||||
on: [push]
|
on: [push]
|
||||||
|
env:
|
||||||
|
GOROOT: /usr/local/lib/go
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pages: write
|
pages: write
|
||||||
id-token: write
|
id-token: write
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: Build site
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker://git.korhonen.cc/functionalhacker/hugo-asciidoc-docker-ci:latest
|
image: docker://git.korhonen.cc/functionalhacker/hugo-asciidoc-docker-ci:latest
|
||||||
volumes:
|
|
||||||
- './public:/public'
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- run: npm install
|
|
||||||
- run: hugo --gc --minify -d /public
|
|
||||||
|
|
||||||
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:
|
environment:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Install NPM packages
|
||||||
|
run: npm install
|
||||||
|
- name: Run Hugo
|
||||||
|
run: hugo --gc --minify -d /public
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-pages-artifact@v3
|
||||||
|
with:
|
||||||
|
path: /public
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
name: Deploy site to github pages
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
Loading…
Reference in a new issue