build(deps): bump dorny/paths-filter from 3 to 4 (#1858) #780
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docs | |
| on: | |
| push: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| name: Build docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Cache cargo registry & git sources | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/ | |
| ~/.cargo/git/db/ | |
| key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }} | |
| ${{ runner.os }}-cargo-docs- | |
| ${{ runner.os }}-cargo- | |
| - name: Run sccache | |
| uses: mozilla-actions/sccache-action@v0.0.9 | |
| - name: Install Rust toolchain | |
| run: make setup | |
| - name: Install protoc | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Build website | |
| run: | | |
| cd docs | |
| npm install | |
| npm run build | |
| - name: Build rustdocs | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: doc | |
| args: --all --no-deps | |
| - name: Copy rustdocs | |
| run: | | |
| cp -r ./target/doc docs/.vitepress/dist/rustdocs | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: 'docs/.vitepress/dist' | |
| deploy: | |
| name: Deploy docs | |
| needs: build | |
| permissions: | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| # Deploy to the github-pages environment | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| # Specify runner + deployment step | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |