Skip to content

Commit 0485adc

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 0485adc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/build-rootfs.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ 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+
if: matrix.arch == 'amd64'
42+
run: >-
43+
./scripts/build-rootfs.sh docs/dist
3944
- name: Upload Release Asset
4045
id: upload-release-asset
4146
uses: softprops/action-gh-release@v2
@@ -45,3 +50,25 @@ jobs:
4550
# yamllint disable-line rule:line-length
4651
# TODO: Sign asset: https://github.com/softprops/action-gh-release/issues/580#2025
4752
token: ${{ secrets.GH_UNIFY_ACCESS_TOKEN }}
53+
- name: Upload pages artifact
54+
id: deployment
55+
if: startsWith(github.ref, 'refs/tags/')
56+
if: matrix.arch == 'amd64'
57+
uses: actions/upload-pages-artifact@v3.0.1
58+
with:
59+
path: docs/
60+
deploy:
61+
needs: build
62+
permissions:
63+
pages: write
64+
id-token: write
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
runs-on: ubuntu-24.04
69+
steps:
70+
- name: Deploy to GitHub Pages
71+
id: deployment
72+
uses: actions/deploy-pages@v4
73+
if: startsWith(github.ref, 'refs/tags/')
74+
if: matrix.arch == 'amd64'

0 commit comments

Comments
 (0)