-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] upload to GitHub Pages directly rather than pushing to a branch
Jujutsu is quite slow at pulling down large force pushed commits.
- Loading branch information
1 parent
5a5a486
commit 9f684d0
Showing
3 changed files
with
48 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,31 +2,56 @@ on: | |
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
name: Docs | ||
|
||
# Sets permissions to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
docs: | ||
name: Build and deploy documentation | ||
build-docs: | ||
name: Build documentation | ||
concurrency: ci-${{ github.ref }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
# Note: caching doesn't appear to work for rustdoc as of 2022-12-04, and we're exceeding cache | ||
# sizes anyway | ||
|
||
- uses: taiki-e/install-action@just | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/[email protected] | ||
- name: Build rustdoc | ||
# cargo-compare currently pulls in cargo which bloats build times massively | ||
run: | | ||
RUSTDOCFLAGS='--cfg=doc_cfg' cargo doc --all-features --workspace --exclude cargo-compare | ||
run: just rustdoc | ||
- name: Organize | ||
run: | | ||
rm -rf target/gh-pages | ||
mkdir target/gh-pages | ||
mv target/doc target/gh-pages/rustdoc | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@releases/v4 | ||
- name: Upload to GitHub Pages | ||
uses: actions/upload-pages-[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: target/gh-pages | ||
single-commit: true | ||
path: target/gh-pages | ||
|
||
deploy-docs: | ||
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/[email protected] |
This file contains 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