Skip to content

Commit bf3b4d1

Browse files
authored
Implement reusable workflows
Signed-off-by: Bradley Reynolds <[email protected]>
1 parent 4aad348 commit bf3b4d1

File tree

1 file changed

+10
-41
lines changed

1 file changed

+10
-41
lines changed

.github/workflows/hugo-deploy.yaml

Lines changed: 10 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,17 @@
1-
name: GitHub Pages - Hugo
1+
name: "GitHub Pages - Hugo"
22

33
on:
4-
workflow_dispatch:
54
push:
65
branches:
76
- main
8-
9-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10-
permissions:
11-
contents: read
12-
pages: write
13-
id-token: write
7+
pull_request:
148

159
jobs:
16-
build:
17-
runs-on: ubuntu-latest
18-
19-
steps:
20-
- name: Checkout repo
21-
uses: actions/checkout@v4
22-
with:
23-
submodules: 'recursive'
24-
25-
- name: Install Hugo
26-
uses: peaceiris/actions-hugo@v2
27-
with:
28-
hugo-version: 'latest'
29-
30-
- run: hugo --minify --environment production
31-
32-
- name: Upload artifact
33-
uses: actions/upload-pages-artifact@v2
34-
with:
35-
path: ./public
36-
37-
deploy:
38-
environment:
39-
name: github-pages
40-
url: ${{ steps.deployment.outputs.page_url }}
41-
42-
runs-on: ubuntu-latest
43-
44-
needs: build
45-
steps:
46-
- name: Deploy to GitHub Pages
47-
id: deployment
48-
uses: actions/deploy-pages@v2
10+
docs:
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
uses: darbiadev/.github/.github/workflows/github-pages-go-hugo.yaml@dda0040d1334e0e516a76d898722d90a5d73677d # v12.0.0

0 commit comments

Comments
 (0)