Also run gh-pages deploy on release

This commit is contained in:
messense 2021-05-05 16:35:37 +08:00
parent 8a89d04ee9
commit 136b7d400f
1 changed files with 2 additions and 2 deletions

View File

@ -44,12 +44,12 @@ jobs:
# This adds the docs to gh-pages-build/doc
- name: Build the doc
run: |
cargo +nightly rustdoc --lib --features="macros num-bigint num-complex hashbrown serde multiple-pymethods" -- --cfg docsrs
cargo +nightly rustdoc --lib --no-default-features --features="macros num-bigint num-complex hashbrown serde multiple-pymethods" -- --cfg docsrs
cp -r target/doc gh-pages-build/doc
echo "<meta http-equiv=refresh content=0;url=pyo3/index.html>" > gh-pages-build/doc/index.html
- name: Deploy
if: github.ref == 'refs/heads/main'
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'release' }}
uses: peaceiris/actions-gh-pages@v3.7.0-8
with:
github_token: ${{ secrets.GITHUB_TOKEN }}