Fix Badges in Readme #11
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: Website | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
RUSTFLAGS: -Cdebuginfo=0 | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
RUST_BACKTRACE: 1 | |
jobs: | |
Tutorials: | |
name: Doc Tutorials | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: docs/tutorials | |
- name: Build Books | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: mdbook@0.4.37 | |
- run: mdbook build docs/tutorials --dest-dir ${GITHUB_WORKSPACE}/public/docs/tutorials | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Doc Tutorials | |
path: public/docs/tutorials | |
Rust-API: | |
name: Doc Rust API | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
components: rust-docs | |
- name: Build API Doc | |
env: | |
FEATURES: parallel serde derive uuid_entity storage-event-control | |
run: cargo doc --all --features "${FEATURES}" # --no-deps | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Doc Rust API | |
path: | | |
target/doc | |
Website: | |
name: Doc Website | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
docs/website | |
- name: Find Base Url | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Use the API to retrieve the github pages url and set an environment variable containing the value. | |
run: echo "GITHUB_PAGES_URL=$(gh api "repos/$GITHUB_REPOSITORY/pages" --jq '.html_url')" >> $GITHUB_ENV | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: zola@0.18.0 | |
- run: zola build --base-url $GITHUB_PAGES_URL | |
working-directory: docs/website | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Doc Zola | |
path: docs/website/public | |
Deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: [ Tutorials, Rust-API, Website ] | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
if: github.event_name != 'pull_request' | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: Doc Tutorials | |
path: public/docs/tutorials | |
- uses: actions/download-artifact@v4 | |
with: | |
name: Doc Rust API | |
path: public/docs/api | |
- uses: actions/download-artifact@v4 | |
with: | |
name: Doc Zola | |
path: public | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: public | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |