xref: /libCEED/.github/workflows/rust-documentation.yml (revision f51dee9518eb5350fb78db022014ce90d8e28980)
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-20.04]
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        cargo doc --package libceed-sys --package libceed --no-deps
28        touch ./target/doc/.nojekyll
29        echo "<meta http-equiv=refresh content=0;url=libceed/index.html>" > ./target/doc/index.html
30    - name: Deploy documentation
31      uses: peaceiris/actions-gh-pages@v3
32      with:
33        external_repository: CEED/libCEED-rust-docs
34        deploy_key: ${{ secrets.RUST_DOCS_KEY }}
35        publish_dir: ./target/doc
36