ci: Deply docs using deploy-pages action
This new mechanism of deploying Github Pages does not require pushing to a branch.
This commit is contained in:
parent
73a61f3862
commit
0feaa7854a
1 changed files with 11 additions and 6 deletions
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
|
|
@ -421,10 +421,15 @@ jobs:
|
|||
- name: Setup index
|
||||
run: cp ./doc_index.html ./target/doc/index.html
|
||||
|
||||
- name: Deploy
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
- name: Upload static files as artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./target/doc
|
||||
force_orphan: true
|
||||
path: ./target/doc
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
|
|
|
|||
Loading…
Reference in a new issue