Skip to content

WEB3-321: feat: deploy steel docs on github pages #3

WEB3-321: feat: deploy steel docs on github pages

WEB3-321: feat: deploy steel docs on github pages #3

name: Deploy Steel Documentation
on:
push:
branches: ["main"]
pull_request:
# Allow manual trigger
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: risc0/risc0/.github/actions/rustup@main
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build documentation
run: cargo doc --no-deps --document-private-items
- name: Create index.html redirect
run: |
echo '<meta http-equiv="refresh" content="0; url=risc0_steel/index.html">' > target/doc/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: target/doc
deploy:
# Only deploy on push to main, not on PRs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4