ci: devnet setup with curio #17075
Workflow file for this run
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: Docs | |
# Cancel workflow if there is a new change to the branch. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
on: | |
push: | |
branches: | |
- main | |
merge_group: | |
pull_request: | |
branches: | |
- main | |
env: | |
CACHE_TIMEOUT_MINUTES: 5 | |
AWS_ACCESS_KEY_ID: '${{ secrets.AWS_ACCESS_KEY_ID }}' | |
AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}' | |
RUSTC_WRAPPER: "sccache" | |
jobs: | |
check-publish-docs: | |
name: Publish | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Configure SCCache variables | |
run: | | |
# External PRs do not have access to 'vars' or 'secrets'. | |
if [[ "$AWS_ACCESS_KEY_ID" != "" ]]; then | |
echo "SCCACHE_ENDPOINT=${{ vars.SCCACHE_ENDPOINT}}" >> $GITHUB_ENV | |
echo "SCCACHE_BUCKET=${{ vars.SCCACHE_BUCKET}}" >> $GITHUB_ENV | |
echo "SCCACHE_REGION=${{ vars.SCCACHE_REGION}}" >> $GITHUB_ENV | |
fi | |
- name: Checkout Sources | |
uses: actions/checkout@v4 | |
- name: Setup sccache | |
uses: mozilla-actions/[email protected] | |
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }} | |
continue-on-error: true | |
- name: Link Checker (Repo Readme) | |
uses: lycheeverse/[email protected] | |
with: | |
args: 'README.md' | |
# Fail action on broken links | |
fail: true | |
- uses: hanabi1224/[email protected] | |
- name: Install MDBook | |
run: make install-doc-tools | |
env: | |
RUSTFLAGS: "-Cstrip=symbols" | |
- name: Execute MDBook | |
run: make mdbook-build | |
- name: Build vendored docs | |
run: make vendored-docs | |
env: | |
CC: "sccache clang" | |
CXX: "sccache clang++" | |
- name: Link Checker (Library Documentation) | |
uses: lycheeverse/[email protected] | |
with: | |
args: './target/doc/forest_filecoin/**/index.html' | |
# Fail action on broken links | |
fail: true | |
- name: Prepare rustdoc for publishing | |
run: mv ./target/doc ./documentation/book/html/rustdoc | |
# The deploy steps are identical expect for name and 'dry-run' attribute. | |
# Ideally this would be refactored. | |
- name: Deploy GH Pages (dry-run) | |
uses: JamesIves/[email protected] | |
if: ${{ github.event_name == 'pull_request' }} | |
with: | |
branch: gh-pages | |
folder: ./documentation/book/html/ | |
dry-run: true | |
- name: Deploy GH Pages | |
uses: JamesIves/[email protected] | |
if: ${{ github.event_name == 'push' }} | |
with: | |
branch: gh-pages | |
folder: ./documentation/book/html/ | |
dry-run: false |