11
11
contents : write # to push chart release and create a release (helm/chart-releaser-action)
12
12
13
13
runs-on : ubuntu-latest
14
+ outputs :
15
+ changed_charts : ${{ steps.chart-releaser.outputs.changed_charts }}
16
+
14
17
steps :
15
18
- name : Checkout Code
16
19
uses : actions/checkout@v4
28
31
29
32
- name : Run chart-releaser
30
33
uses : helm/chart-releaser-action@v1.6.0
34
+ id : chart-releaser
31
35
env :
32
36
CR_TOKEN : " ${{ github.token }}"
33
37
@@ -37,18 +41,13 @@ jobs:
37
41
contents : write # Needed to commit the generated file
38
42
needs :
39
43
- release
44
+ if : needs.release.outputs.changed_charts != ''
40
45
steps :
41
46
- uses : actions/checkout@v4
42
47
with :
43
48
ref : gh-pages
44
49
fetch-depth : 0
45
50
46
- - name : debug-print
47
- run : |
48
- echo "Current directory is $(pwd)"
49
- echo "Contents of the directory are $(ls -la)"
50
- echo "Contents of the directory are $(ls -la /home/runner/work/helm-release/helm-release/)"
51
-
52
51
- name : Generate Helm Charts HTML
53
52
uses : ./.github/actions/generate-helm-html-index
54
53
with :
61
60
git config --local user.name "GitHub Action"
62
61
git add index.html
63
62
git commit -m "Update Helm charts page" || exit 0 # Don't fail if no changes
64
- git push
63
+ git push
64
+
65
+ deploy :
66
+ environment :
67
+ name : github-pages
68
+ url : ${{ steps.deployment.outputs.page_url }}
69
+ runs-on : ubuntu-latest
70
+ needs :
71
+ - generate-page
72
+ steps :
73
+ - name : Checkout
74
+ uses : actions/checkout@v4
75
+ - name : Setup Pages
76
+ uses : actions/configure-pages@v5
77
+ - name : Upload artifact
78
+ uses : actions/upload-pages-artifact@v3
79
+ with :
80
+ # Upload entire repository
81
+ path : ' .'
82
+ - name : Deploy to GitHub Pages
83
+ id : deployment
84
+ uses : actions/deploy-pages@v4
0 commit comments