Skip to content

Commit 2dc0771

Browse files
committed
github: workflow: docs: Push 'main' docs to gh-pages
WIP to detect pushes to 'main', and push the latest docs to gh-pages. This currently does the push on any local PR, though. Signed-off-by: David Brown <[email protected]>
1 parent 49c6712 commit 2dc0771

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/docs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ jobs:
6262
name: rustdocs
6363
path: zephyr-lang-rust/rustdocs
6464

65+
- name: Upload pages artifact
66+
uses: actions/upload-pages-artifact@v3
67+
with:
68+
path: zephyr-lang-rust/rustdocs
69+
6570
doc-publish:
6671
name: Publish Rust Documentation
6772
needs: generate-docs
@@ -94,3 +99,20 @@ jobs:
9499
run: |
95100
PR_NUM=${{ github.event.number || 'not-a-pr' }}
96101
aws s3 sync --only-show-errors . s3://builds.zephyrproject.org/zephyr-lang-rust/pr/$PR_NUM/
102+
103+
gh-publish:
104+
name: Publish main to gh-pages
105+
needs: generate-docs
106+
permissions:
107+
pages: write
108+
id-token: write
109+
runs-on: ubuntu-24.04
110+
# TODO: This "if" should be for main, but need the PR to test.
111+
if: |
112+
github.event_name = 'pull_request' &&
113+
github.repository == 'zephyrproject-rtos/zephyr-lang-rust'
114+
115+
steps:
116+
- name: Deploy to GitHub Pages
117+
id: deployment
118+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)