cargo doc to GitHub Pages #1
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: Build Tauri App | |
on: | |
push: | |
branches: | |
- main | |
- doc-gh-pages | |
env: | |
CARGO_TERM_COLOR: always | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Rustup | |
run: rustup toolchain install stable --profile minimal | |
- name: Build Doc | |
run: cargo doc --no-deps | |
- name: Upload Doc | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: target/doc | |
pages: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v3 |