Repository navigation
61 lines (57 loc) · 1.57 KB
/
Copy pathdocs.yaml
File metadata and controls
61 lines (57 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Docs & Charts
on:
workflow_call:
workflow_dispatch:
release:
types: [published]
push:
branches:
- "main"
paths:
- "www/**/*"
- ".github/workflows/docs.yml"
pull_request:
paths:
- "www/**/*"
- ".github/workflows/docs.yml"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: www/go.mod
- uses: peaceiris/actions-hugo@d1c81a15d4e6dca7086a17b9c2565cb70fd576bf # v3
with:
hugo-version: "latest"
extended: true
- run: hugo --minify
working-directory: ./www/
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
- run: go tool github.com/zeiss/pkg/cmd/helm/index --repo ${{ github.repository }} --index www/public/index.yaml
- uses: actions/upload-pages-artifact@v5
id: deployment
with:
path: ./www/public
deploy:
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5