Skip to content

Commit

Permalink
update workflow to be better
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Kagno committed Nov 13, 2024
1 parent 7c07d0f commit ce02826
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

jobs:
deploy:
build:
permissions:
contents: write
runs-on: ubuntu-22.04
Expand All @@ -22,15 +22,29 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.119.0"
hugo-version: "0.138.0"
extended: true

- name: Build
run: hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
- name: Upload Public
uses: actions/upload-artifact@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
name: public
path: ./public/*
if-no-files-found: error
include-hidden-files: true
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit ce02826

Please sign in to comment.