Skip to content

Commit

Permalink
Update GH pages workflow, bump Hugo
Browse files Browse the repository at this point in the history
  • Loading branch information
taiidani committed Jul 15, 2023
1 parent 704ffa0 commit 17d9982
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 7 deletions.
46 changes: 39 additions & 7 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,57 @@ on:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

defaults:
run:
shell: bash

jobs:
deploy:
build:
runs-on: ubuntu-20.04
env:
HUGO_VERSION: 0.114.0
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.80.0"
hugo-version: ${{ env.HUGO_VERSION }}

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3

- name: Build
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
path: ./public

deploy:
runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
public
.hugo_build.lock
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hugo 0.114.0

0 comments on commit 17d9982

Please sign in to comment.