mirror of
https://github.com/bevyengine/bevy.git
synced 2026-05-06 06:06:42 -04:00
b3012e85bf
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 4.0.0 to 5.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/upload-pages-artifact/releases">actions/upload-pages-artifact's releases</a>.</em></p> <blockquote> <h2>v5.0.0</h2> <h1>Changelog</h1> <ul> <li>Update upload-artifact action to version 7 <a href="https://github.com/Tom-van-Woudenberg"><code>@Tom-van-Woudenberg</code></a> (<a href="https://redirect.github.com/actions/upload-pages-artifact/issues/139">#139</a>)</li> <li>feat: add <code>include-hidden-files</code> input <a href="https://github.com/jonchurch"><code>@jonchurch</code></a> (<a href="https://redirect.github.com/actions/upload-pages-artifact/issues/137">#137</a>)</li> </ul> <p>See details of <a href="https://github.com/actions/upload-pages-artifact/compare/v4.0.0...v4.0.1">all code changes</a> since previous release.</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/upload-pages-artifact/commit/fc324d3547104276b827a68afc52ff2a11cc49c9"><code>fc324d3</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-pages-artifact/issues/139">#139</a> from Tom-van-Woudenberg/patch-1</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/fe9d4b7d84090e1d8d9c53a0236f810d4e00d2c3"><code>fe9d4b7</code></a> Merge branch 'main' into patch-1</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/0ca16172ca884f0a37117fed41734f29784cc980"><code>0ca1617</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-pages-artifact/issues/137">#137</a> from jonchurch/include-hidden-files</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/57f0e8492b437b7818227931fef2faa1a379839b"><code>57f0e84</code></a> Update action.yml</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/4a90348b2933470dc78cec55534259872a6d3c0d"><code>4a90348</code></a> v7 --> hash</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/56f665a6f297fa95f8d735b314187fb2d7764569"><code>56f665a</code></a> Update upload-artifact action to version 7</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/f7615f5917213b24245d49ba96693d0f5375a414"><code>f7615f5</code></a> Add <code>include-hidden-files</code> input</li> <li>See full diff in <a href="https://github.com/actions/upload-pages-artifact/compare/7b1f4a764d45c48632c6b24a0339c27f5614fb0b...fc324d3547104276b827a68afc52ff2a11cc49c9">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
101 lines
3.5 KiB
YAML
101 lines
3.5 KiB
YAML
name: Deploy Docs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
# Allows running the action manually.
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTDOCFLAGS: --html-in-header header.html
|
|
# If nightly is breaking CI, modify this variable to target a specific nightly version.
|
|
NIGHTLY_TOOLCHAIN: nightly
|
|
|
|
# Sets the permissions to allow deploying to Github pages.
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
# Only allow one deployment to run at a time, however it will not cancel in-progress runs.
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
# Only run this job when on the main Bevy repository. Without this, it would also run on forks
|
|
# where developers work on the main branch but have not enabled Github Pages.
|
|
if: ${{ github.repository == 'bevyengine/bevy' }}
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
|
|
with:
|
|
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
|
|
|
|
- name: Install Linux dependencies
|
|
uses: ./.github/actions/install-linux-deps
|
|
with:
|
|
wayland: true
|
|
xkb: true
|
|
x264: true
|
|
fontconfig: true
|
|
|
|
# This does the following:
|
|
# - Replaces the docs icon with one that clearly denotes it's not the released package on crates.io
|
|
# - Adds a meta tag that forces Google not to index any page on the site.
|
|
- name: Pre-docs-build
|
|
run: |
|
|
sed -i.bak "s/icon.png/icon-docs-dev.png/" src/lib.rs
|
|
echo "<meta name=\"robots\" content=\"noindex\">" > header.html
|
|
|
|
- name: Build docs
|
|
env:
|
|
# needs to be in sync with [package.metadata.docs.rs]
|
|
RUSTFLAGS: --cfg docsrs_dep
|
|
RUSTDOCFLAGS: -Zunstable-options --cfg=docsrs --generate-link-to-definition --generate-macro-expansion --html-after-content docs-rs/trait-tags.html
|
|
run: |
|
|
cargo doc \
|
|
-Zunstable-options \
|
|
-Zrustdoc-scrape-examples \
|
|
--all-features \
|
|
--workspace \
|
|
--no-deps \
|
|
--document-private-items \
|
|
--exclude ci \
|
|
--exclude errors \
|
|
--exclude bevy_mobile_example \
|
|
--exclude build-wasm-example \
|
|
--exclude build-templated-pages \
|
|
--exclude example-showcase
|
|
|
|
# This adds the following:
|
|
# - A top level redirect to the bevy crate documentation
|
|
# - A CNAME file for redirecting the docs domain to the API reference
|
|
# - A robots.txt file to forbid any crawling of the site (to defer to the docs.rs site on search engines).
|
|
- name: Finalize documentation
|
|
run: |
|
|
echo "<meta http-equiv=\"refresh\" content=\"0; url=bevy/index.html\">" > target/doc/index.html
|
|
echo "dev-docs.bevy.org" > target/doc/CNAME
|
|
echo $'User-Agent: *\nDisallow: /' > target/doc/robots.txt
|
|
rm target/doc/.lock
|
|
|
|
- name: Upload site artifact
|
|
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
|
|
with:
|
|
path: target/doc
|
|
|
|
- name: Deploy to Github Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
|