Skip to content

Commit 0bb8625

Browse files
committed
Patch workflow
1 parent 3c77ae7 commit 0bb8625

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

.github/workflows/gh-pages.yml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,29 @@ on:
88
- master
99

1010
jobs:
11-
build_and_deploy_hugo_site:
12-
runs-on: ubuntu-latest
13-
name: Build and deploy Hugo site
14-
11+
build-deploy:
12+
runs-on: ubuntu-24.04
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
1515
steps:
16-
- name: Setup Hugo
17-
uses: peaceiris/actions-hugo@v2
18-
with:
19-
hugo-version: '0.148.2'
20-
21-
- name: Checkout repo on source_branch
22-
uses: actions/checkout@v2
23-
24-
- name: Build site and push to release branch
25-
uses: aormsby/hugo-deploy-to-pages@v2.1
26-
id: build_step # <<for outputs>>
27-
with:
28-
source_branch: 'master'
29-
release_branch: 'gh-pages'
30-
# submodule_release_branch: 'subbed' <<only provide if you are publishing to directory with git submodule>>
31-
# full_rebuild: true
32-
hugo_publish_directory: './public'
33-
# hugo_build_options: '-D --minify --ignoreCache' <<hugo build cis customizable>>
34-
commit_message: "Built/update website via action."
35-
# test_mode: true <<enable to run a few verification tests before your first live run>>
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
with:
19+
submodules: true
20+
fetch-depth: 0
21+
22+
- name: Setup Hugo
23+
uses: peaceiris/actions-hugo@v2
24+
with:
25+
hugo-version: "latest"
26+
27+
- name: Build
28+
run: hugo --minify
3629

37-
# <<lots of other options!>>
30+
- name: Deploy
31+
uses: peaceiris/actions-gh-pages@v3
32+
if: ${{ github.ref == 'refs/heads/main' }}
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_branch: gh-pages
36+
publish_dir: ./public

0 commit comments

Comments
 (0)