Update github page to new actions

This commit is contained in:
2024-04-03 12:48:11 +02:00
parent dd5e786f01
commit 5f05ad7adb

View File

@@ -1,22 +1,32 @@
name: GitHub Pages
name: Deploy
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build-deploy:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
@@ -24,12 +34,20 @@ jobs:
extended: true
- name: Build
run: hugo --minify
run: hugo --gc --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./public
path: ./public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4