Format workflows
All checks were successful
Build and deploy site / Build and deploy site (push) Successful in 1m24s
All checks were successful
Build and deploy site / Build and deploy site (push) Successful in 1m24s
This commit is contained in:
parent
ef6d3838d4
commit
3ec0c545cd
|
@ -1,7 +1,10 @@
|
|||
name: Build and deploy site
|
||||
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
GOROOT: /usr/local/lib/go
|
||||
|
||||
jobs:
|
||||
deploy_site:
|
||||
name: Build and deploy site
|
||||
|
@ -10,10 +13,13 @@ jobs:
|
|||
image: git.korhonen.cc/functionalhacker/hugo-asciidoc-docker-ci:latest
|
||||
volumes:
|
||||
- caddy_korhonen_cc:/public
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Install NPM packages
|
||||
run: npm install
|
||||
|
||||
- name: Run Hugo
|
||||
run: hugo --gc --minify --cleanDestinationDir -d /public
|
||||
|
|
21
.github/workflows/deploy_site.yaml
vendored
21
.github/workflows/deploy_site.yaml
vendored
|
@ -1,38 +1,49 @@
|
|||
name: Build and deploy site
|
||||
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
GOROOT: /usr/local/lib/go
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build site
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
container:
|
||||
image: docker://git.korhonen.cc/functionalhacker/hugo-asciidoc-docker-ci:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Fix git ownership
|
||||
run: git config --global --add safe.directory /__w/korhonen.cc/korhonen.cc
|
||||
|
||||
- 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:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
deploy:
|
||||
name: Deploy site to GitHub Pages
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
|
||||
steps:
|
||||
- name: Deploy site to GitHub Pages
|
||||
id: deployment
|
||||
|
|
Loading…
Reference in a new issue