diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a01846..022524d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 '' > 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