-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: add deploy action * chore: add redirect index page * chore: add concurrency * perf: remove test when bulding docs
- Loading branch information
1 parent
f1f38ad
commit 6e837bd
Showing
2 changed files
with
64 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Documentation Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# Builds the documentation and upload as an artifact | ||
docs-build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Rust Nightly and Rust Docs | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly | ||
rustup component add rust-docs | ||
- name: Set up Just | ||
uses: extractions/setup-just@v1 | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Generate docs | ||
run: | | ||
just doc | ||
echo "<meta http-equiv='refresh' content='0; URL=./stratus/'>" >> target/doc/index.html | ||
chmod -c -R +rX target/doc/ | ||
- name: Upload docs artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: 'target/doc' | ||
|
||
# Uploads the documentation to GitHub Pages | ||
docs-release: | ||
runs-on: ubuntu-latest | ||
needs: docs-build | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Download GH Pages artifact | ||
uses: actions/download-artifact@v3 | ||
|
||
- name: Configure GH Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Deploy to GH Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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