1- # ---------------------------------------------------------------------------------------
2- # Title: Continuous Delivery (Packaging)
3- #
4- # Requirements:
1+ # title: Continuous Delivery (Packaging)
2+ # requirements:
53# - Create manually "gh-pages" branch
64# - Maintain pages files in "gh-pages" branch: index.tpl, placeholder.png
7- #
8- # Uses:
5+ # uses:
96# - https://github.com/helm/chart-releaser-action
107# - https://github.com/halkeye/helm-repo-html
11- # ---------------------------------------------------------------------------------------
8+ # - https://github.com/actions/configure-pages
129
1310name : PKG
1411
@@ -23,6 +20,10 @@ permissions:
2320 pages : write
2421 id-token : write
2522
23+ concurrency :
24+ group : pages
25+ cancel-in-progress : false
26+
2627jobs :
2728 build :
2829 runs-on : ubuntu-latest
3839 cache : npm
3940 - name : Install Node.js dependencies
4041 run : npm install
42+ # ref. https://vitepress.dev/guide/deploy#github-pages
4143 - name : Build with VitePress
4244 run : npm run docs:build
43- # https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address
45+ - uses : actions/upload-artifact@v4
46+ with :
47+ name : docs
48+ path : docs/.vitepress/dist/
49+ # ref. https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address
4450 - name : Configure Git
4551 run : |
4652 git config user.name "$GITHUB_ACTOR"
6167 uses : actions/checkout@v4
6268 with :
6369 ref : gh-pages
70+ - uses : actions/download-artifact@v4
71+ with :
72+ name : docs
73+ path : docs
74+ - name : DEBUG
75+ run : |
76+ ls -alrt .
77+ ls -alrt docs
6478 - name : Setup Go environment
6579 uses : actions/setup-go@v5
6680 - name : Generate index.html
@@ -76,16 +90,18 @@ jobs:
7690 destination : ./_site
7791 - name : Copy docs to website folder
7892 run : |
79- mkdir -p _site/docs
80- cp -r docs/.vitepress/dist/* _site/docs/
93+ id
94+ ls -alrt ./_site
95+ sudo mkdir -p ./_site/docs
96+ sudo cp -r docs/* ./_site/docs/
8197 - name : Upload artifact
8298 uses : actions/upload-pages-artifact@v3
8399 deploy :
100+ runs-on : ubuntu-latest
101+ needs : build
84102 environment :
85103 name : github-pages
86104 url : ${{ steps.deployment.outputs.page_url }}
87- runs-on : ubuntu-latest
88- needs : build
89105 steps :
90106 - name : Deploy to GitHub Pages
91107 id : deployment
0 commit comments