Skip to content

chore(deps): update taiki-e/install-action action to v2.85.12 #721

chore(deps): update taiki-e/install-action action to v2.85.12

chore(deps): update taiki-e/install-action action to v2.85.12 #721

Workflow file for this run

name: "docs"
permissions: {}
on:
pull_request:
# run "deploy-pages" job to deploy main branch to GitHub pages
push:
branches: [ "main" ]
env:
RUSTFLAGS: "-Dwarnings"
CARGO_INCREMENTAL: "false"
CARGO_PROFILE_TEST_DEBUG: "false"
CARGO_TERM_VERBOSE: "true"
CARGO_TERM_COLOR: "always"
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-rustdoc:
name: "cargo docs-rs"
permissions:
contents: read
runs-on: ubuntu-24.04
steps:
- uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- id: toolchain
uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # doesn't have usual versioned releases/tags
with:
toolchain: nightly
- run: echo "RUSTUP_TOOLCHAIN=${RUSTUP_TOOLCHAIN}" >> "${GITHUB_ENV}"
env:
RUSTUP_TOOLCHAIN: ${{ steps.toolchain.outputs.name }}
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- uses: taiki-e/install-action@7a562dfa955aa2e4d5b0fd6ebd57ff9715c07b0b # v2.73.0
with:
# renovate: taiki-e/install-action
tool: cargo-docs-rs@1.0.0
- run: |
crate_version=$(cargo metadata --format-version 1 --no-deps | jq --raw-output '.packages[] | select(.name == "magic-sys").version')
echo "ver=${crate_version}" >> "${GITHUB_OUTPUT}"
repo_rev=$(git rev-parse --short=4 "${SHA}")
echo "rev=${repo_rev}" >> "${GITHUB_OUTPUT}"
id: crate-info
env:
SHA: ${{ github.event.pull_request.head.sha || github.sha }}
- run: cargo docs-rs --version
- run: RUSTDOCFLAGS="--crate-version ${VER}+${REV} --enable-index-page" cargo docs-rs --verbose --color always --locked --target-dir 'target/doc'
env:
VER: ${{ steps.crate-info.outputs.ver }}
REV: ${{ steps.crate-info.outputs.rev }}
- uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: Fix permissions
run: |
chmod -c -R +rX "target/doc/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
with:
path: target/doc/x86_64-unknown-linux-gnu/doc/
deploy-pages:
name: "deploy GitHub Pages"
if: github.event_name == 'push'
permissions:
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04
needs: build-rustdoc
steps:
- uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5