try new workflow

This commit is contained in:
Anton Roslund
2025-02-16 19:40:26 +01:00
parent a4d7ec5d23
commit 2d2bd77468
+17 -12
View File
@@ -1,29 +1,34 @@
name: Deploy Hugo site
name: GitHub Pages
on:
push:
branches:
- main # Deploy when changes are pushed to "main"
- main # Set a branch to deploy
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Install Hugo
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
hugo-version: '0.119.0'
# extended: true
- name: Build the site
- name: Build
run: hugo --minify
- name: Deploy to GitHub Pages
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_dir: ./public