-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.62 KB
/
release-artifacts.yaml
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
62
63
64
name: Release Artifacts
on:
push:
branches:
- main
jobs:
helm-release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Release Helm Charts
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
helm-docs:
needs: helm-release
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: 'main'
- name: Generate Documentation
run: |
curl -sL https://github.com/norwoodj/helm-docs/releases/latest/download/helm-docs_linux_amd64.tar.gz | tar -xz
sudo mv helm-docs /usr/local/bin/helm-docs
cd charts
for d in */ ; do
helm-docs -c $d
done
- name: Checkout gh-pages Branch
uses: actions/checkout@v3
with:
ref: 'gh-pages'
path: 'gh-pages'
- name: Copy Documentation to gh-pages
run: |
cp -r charts/*/README.md gh-pages/
- name: Commit and Push Changes to gh-pages
run: |
cd gh-pages
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add .
git commit -m "Update documentation" -a || echo "No changes to commit"
git push origin gh-pages