Skip to content

Commit ed1c8d6

Browse files
authored
ci: use beta deploy-pages to remove gh-pages branch for nightly docs
1 parent 10a4f70 commit ed1c8d6

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,26 @@ jobs:
198198
cargo +nightly rustdoc \
199199
--features chrono,embedded-time,rt,stm32wl5x_cm4 \
200200
-- -Z unstable-options --enable-index-page
201-
- name: deploy
202-
if: ${{ github.ref == 'refs/heads/main' }}
203-
uses: peaceiris/actions-gh-pages@v3
201+
- name: Upload artifact
202+
uses: actions/upload-pages-artifact@v1
204203
with:
205-
github_token: ${{ secrets.GITHUB_TOKEN }}
206-
publish_dir: ./target/doc
207-
force_orphan: true
204+
path: target/doc
205+
206+
deploy_rustdoc:
207+
name: Deploy Nightly Docs
208+
runs-on: ubuntu-latest
209+
needs: rustdoc
210+
if: ${{ github.ref == 'refs/heads/main' }}
211+
permissions:
212+
pages: write
213+
id-token: write
214+
environment:
215+
name: github-pages
216+
url: ${{ steps.deployment.outputs.page_url }}
217+
steps:
218+
- name: Deploy to GitHub Pages
219+
uses: actions/deploy-pages@v1
220+
id: deployment
208221

209222
release:
210223
name: crates.io release

0 commit comments

Comments
 (0)