xref: /libCEED/.github/workflows/rust-documentation.yml (revision 5f7b070ae0e28493cf35323106ffbe004b90d721)
1name: Rust Documentation
2
3on:
4  push:
5    branches:
6      - main
7      - jeremy/rust
8    tags: '*'
9
10jobs:
11  build:
12    strategy:
13      matrix:
14        os: [ubuntu-latest]
15
16    runs-on: ${{ matrix.os }}
17
18    steps:
19    - name: Environment setup
20      uses: actions/checkout@v2
21    - name: Rust setup
22      uses: actions-rs/toolchain@v1
23      with:
24        toolchain: stable
25    - name: Build documentation
26      run: |
27        cd rust
28        cargo doc --all --no-deps
29        touch ./target/doc/.nojekyll
30        echo "<meta http-equiv=refresh content=0;url=libceed/index.html>" > ./target/doc/index.html
31        cd ..
32    - name: Deploy documentation
33      uses: peaceiris/actions-gh-pages@v3
34      with:
35        external_repository: CEED/libCEED-rust-docs
36        deploy_key: ${{ secrets.RUST_DOCS_KEY }}
37        publish_dir: ./rust/target/doc
38