add header:add_filter and add some examples #23
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: [main] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: deploy | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: cargo clean | |
| run: cargo clean --doc | |
| - name: cargo docs | |
| run: cargo doc --no-deps | |
| - name: meta redirect | |
| run: echo '<meta http-equiv="refresh" content="0;url=aoc/index.html">' > target/doc/index.html | |
| deploy: | |
| name: Deploy | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: gh-pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |