replaced documentation post with seperate step
This commit is contained in:
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -189,9 +189,25 @@ jobs:
|
||||
path: |
|
||||
${{ needs.detect-project.outputs.project-dir }}/target/${{ matrix.target }}/release/${{ needs.detect-project.outputs.project-name }}${{ matrix.os == 'windows' && '.exe' || '' }}"
|
||||
|
||||
documentation:
|
||||
name: Build and Deploy Documentation
|
||||
needs: [detect-project, test]
|
||||
if: ${{ !failure() && !cancelled() && github.event_name == 'push' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Build documentation
|
||||
working-directory: ${{ needs.detect-project.outputs.project-dir }}
|
||||
run: cargo doc --no-deps
|
||||
run: |
|
||||
cargo doc --no-deps --all-features
|
||||
# Create redirect index if needed
|
||||
echo '<meta http-equiv="refresh" content="0; url=${{ needs.detect-project.outputs.project-name }}/index.html">' > target/doc/index.html
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
@@ -199,6 +215,7 @@ jobs:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ${{ needs.detect-project.outputs.project-dir }}/target/doc
|
||||
publish_branch: gh-pages
|
||||
force_orphan: true
|
||||
|
||||
docker-build:
|
||||
name: Build and Push Docker Image
|
||||
|
Reference in New Issue
Block a user