Files
iroh/.github/workflows/docs.yaml
ramfoxanddependabot[bot] 3e9a854c32 chore(*): dependabot updates (#4652)
This PR rolls up the following dependabot PRs:

- #4632: chore(deps): bump proptest from 1.11.0 to 1.12.0
- #4633: chore(deps): bump redb from 4.3.0 to 4.4.0
- #4634: chore(deps): bump the github-actions group across 1 directory
with 4 updates
- #4648: chore(deps): bump portmapper from 0.19.3 to 0.20.0
- #4649: chore(deps): bump base64-url from 3.0.4 to 4.0.0
- #4650: chore(deps): bump lru from 0.18.4 to 0.19.0

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-05 13:23:33 +00:00

84 lines
2.9 KiB
YAML

name: Docs Preview
on:
pull_request:
workflow_dispatch:
inputs:
pr_number:
required: true
type: string
# ensure job runs sequentially so pushing to the preview branch doesn't conflict
concurrency:
group: ci-docs-preview
env:
IROH_FORCE_STAGING_RELAYS: "1"
# Default to read-only; jobs that need more grant it explicitly.
permissions:
contents: read
jobs:
preview_docs:
permissions:
contents: write # actions-gh-pages pushes the preview branch
pull-requests: write # find-comment / create-or-update-comment
timeout-minutes: 30
name: Docs preview
if: ${{ (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ) && !github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest
env:
RUSTC_WRAPPER: "sccache"
SCCACHE_GHA_ENABLED: "on"
SCCACHE_CACHE_SIZE: "10G"
PREVIEW_PATH: pr/${{ github.event.pull_request.number || inputs.pr_number }}/docs
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
with:
toolchain: nightly-2025-10-09
- name: Install sccache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
continue-on-error: true
- uses: $/.github/workflows/sccache-probe
- name: Generate Docs
run: cargo doc --locked --workspace --all-features --no-deps
env:
RUSTDOCFLAGS: --cfg iroh_docsrs
- name: Deploy Docs to Preview Branch
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc/
destination_dir: ${{ env.PREVIEW_PATH }}
publish_branch: generated-docs-preview
- name: Find Docs Comment
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0
id: fc
with:
issue-number: ${{ github.event.pull_request.number || inputs.pr_number }}
comment-author: 'github-actions[bot]'
body-includes: Documentation for this PR has been generated
- name: Get current timestamp
id: get_timestamp
run: echo "TIMESTAMP=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: Create or Update Docs Comment
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
with:
issue-number: ${{ github.event.pull_request.number || inputs.pr_number }}
comment-id: ${{ steps.fc.outputs.comment-id }}
body: |
Documentation for this PR has been generated and is available at: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/${{ env.PREVIEW_PATH }}/iroh/
Last updated: ${{ env.TIMESTAMP }}
edit-mode: replace