[138] Website: GitHub-Pages-Workflow (Hugo 0.147.9 extended), Links über relURL und Render-Hooks, läuft auch unter /DOSSIER/
This commit is contained in:
12 files changed
+99
-45
No files matched your search
@@ -0,0 +1,51 @@
|
||||
# Website (website/) mit Hugo bauen und auf GitHub Pages veröffentlichen ([138]).
|
||||
# Voraussetzung: in den Repo-Einstellungen Pages → Source: „GitHub Actions".
|
||||
name: pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- "website/**"
|
||||
- ".github/workflows/pages.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
HUGO_VERSION: "0.147.9"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Hugo extended installieren
|
||||
run: |
|
||||
curl -fsSL -o hugo.tar.gz "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
|
||||
tar -xzf hugo.tar.gz hugo
|
||||
./hugo version
|
||||
- id: pages
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Bauen
|
||||
run: ./hugo --source website --minify --panicOnWarning --baseURL "${{ steps.pages.outputs.base_url }}/"
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: website/public
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
Reference in new issue
Block a user