Merge pull request #371 from conjure-cp/dependabot/cargo/all-a4868bdd6b #120
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
name: "Documentation" | |
on: | |
push: | |
branches: | |
- main # run for pushes to the main branch | |
workflow_dispatch: | |
env: | |
rust_release: nightly | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
permissions: | |
contents: write | |
jobs: | |
coverage: | |
name: "Generate Documentation" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v2 | |
- name: Run sccache-cache | |
uses: mozilla-actions/sccache-action@v0.0.3 | |
- name: Get Sha | |
id: sha | |
run: | | |
echo -e "sha=${{ github.sha }}" >> "$GITHUB_OUTPUT" | |
echo -e "sha=${{ github.sha }}" | |
- name: Install rust ${{ env.rust_release }} | |
run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }} | |
- name: Generate documentation | |
working-directory: . | |
run: | | |
./tools/gen_docs.sh | |
- name: Move all html to correct folders for deployment | |
run: | | |
mkdir deploy | |
cp -r target/doc/* deploy | |
- name: Deploy to Github Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: ./deploy | |
target-folder: "docs" | |
branch: gh-pages | |
commit-message: "Actions: Documentation for ${{ steps.sha.outputs.result }}" |