Skip to content

Commit 0ff8903

Browse files
committed
SWPROT-8953: github: Build docs package and deploy to web
Currently only tags are deployed to gh-pages, ideally docs should be versionned and tagged and eventually browsable for users. Relate-to: https://siliconlabssoftware.github.io/z-wave-protocol-controller Origin: #30 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
1 parent 5c5b076 commit 0ff8903

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/build-rootfs.yml

+24
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ jobs:
3636
# yamllint disable-line rule:line-length
3737
name: ${{ github.event.repository.name }}-${{ steps.describe.outputs.describe }}-${{ matrix.arch }}
3838
path: build/dist/
39+
- name: Build documentation once
40+
if: startsWith(github.ref, 'refs/tags/')
41+
run: >-
42+
./scripts/build-rootfs.sh docs/dist
3943
- name: Upload Release Asset
4044
id: upload-release-asset
4145
uses: softprops/action-gh-release@v2
@@ -45,3 +49,23 @@ jobs:
4549
# yamllint disable-line rule:line-length
4650
# TODO: Sign asset: https://github.com/softprops/action-gh-release/issues/580#2025
4751
token: ${{ secrets.GH_UNIFY_ACCESS_TOKEN }}
52+
- name: Upload pages artifact
53+
id: deployment
54+
if: startsWith(github.ref, 'refs/tags/')
55+
uses: actions/upload-pages-artifact@v3.0.1
56+
with:
57+
path: docs/
58+
deploy:
59+
needs: build
60+
permissions:
61+
pages: write
62+
id-token: write
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deployment.outputs.page_url }}
66+
runs-on: ubuntu-24.04
67+
steps:
68+
- name: Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@v4
71+
if: startsWith(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)