chore: migrate to rust 2024 edition (#185) #6
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: Continuous deployment | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| # Allow triggering manual builds | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages-deployment" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| name: Generate docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # - name: Install Rust | |
| # run: rustup toolchain install 1.90.0 --profile minimal | |
| # - name: Configure sccache | |
| # uses: actions/github-script@v7 | |
| # with: | |
| # script: | | |
| # core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULT_URL || ''); | |
| # core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
| # | |
| # - name: Run sccache-cache | |
| # uses: mozilla-actions/sccache-action@v0.0.3 | |
| - name: Configure Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Generate documentation | |
| run: cargo doc --no-deps --all-features | |
| - name: Add root index | |
| run: | | |
| cd target/doc | |
| touch index.html | |
| echo "<meta http-equiv=\"refresh\" content=\"0; url=https://bedrock-crustaceans.github.io/bedrock-rs/bedrockrs/index.html\">" > index.html | |
| - name: Upload docs artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: target/doc | |
| deploy: | |
| name: Deploy docs | |
| needs: build | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to Github Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |