Merge pull request #2599 from davidhewitt/no-main-gh-pages

gh-pages: stop building guide for main
This commit is contained in:
messense 2022-08-28 12:04:27 +08:00 committed by GitHub
commit 511303a102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 36 deletions

View File

@ -39,13 +39,6 @@ jobs:
TAG_NAME="${GITHUB_REF##*/}"
echo "::set-output name=tag_name::${TAG_NAME}"
# Build some internal docs and inject a banner on top of it.
- name: Build the internal docs
run: cargo xtask doc --internal
- name: Clear the extra artefacts created earlier
run: rm -rf target
# This builds the book in target/guide.
- name: Build the guide
run: |
@ -54,15 +47,8 @@ jobs:
env:
PYO3_VERSION_TAG: ${{ steps.prepare_tag.outputs.tag_name }}
# This adds the docs to target/guide/doc
- name: Build the doc
run: |
cargo xtask doc
mv target/doc target/guide/doc
echo "<meta http-equiv=refresh content=0;url=pyo3/index.html>" > target/guide/doc/index.html
- name: Deploy docs and the guide
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'release' }}
if: ${{ github.event_name == 'release' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
@ -70,27 +56,6 @@ jobs:
destination_dir: ${{ steps.prepare_tag.outputs.tag_name }}
full_commit_message: "Upload documentation for ${{ steps.prepare_tag.outputs.tag_name }}"
guide-release:
needs: guide-build
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' }}
steps:
- name: Create latest tag redirects
env:
TAG_NAME: ${{ needs.build.outputs.tag_name }}
run: |
mkdir public
echo "<meta http-equiv=refresh content=0;url='$TAG_NAME/'>" > public/index.html
ln -sfT $TAG_NAME public/latest
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public/
full_commit_message: "Release ${{ needs.build.outputs.tag_name }}"
keep_files: true
cargo-benchmark:
if: ${{ github.ref_name == 'main' }}
name: Cargo benchmark