xref: /libCEED/.github/workflows/rust-documentation.yml (revision b0ae8d517c946075df97529a50d1cf3d819480eb)
18a4ce0d7SJeremy L Thompsonname: Rust Documentation
28a4ce0d7SJeremy L Thompson
38a4ce0d7SJeremy L Thompsonon:
48a4ce0d7SJeremy L Thompson  push:
58a4ce0d7SJeremy L Thompson    branches:
68a4ce0d7SJeremy L Thompson      - main
78a4ce0d7SJeremy L Thompson      - jeremy/rust
88a4ce0d7SJeremy L Thompson    tags: '*'
98a4ce0d7SJeremy L Thompson
108a4ce0d7SJeremy L Thompsonjobs:
118a4ce0d7SJeremy L Thompson  build:
128a4ce0d7SJeremy L Thompson    strategy:
138a4ce0d7SJeremy L Thompson      matrix:
14*b0ae8d51SJed Brown        os: [ubuntu-20.04]
158a4ce0d7SJeremy L Thompson
168a4ce0d7SJeremy L Thompson    runs-on: ${{ matrix.os }}
178a4ce0d7SJeremy L Thompson
188a4ce0d7SJeremy L Thompson    steps:
198a4ce0d7SJeremy L Thompson    - name: Environment setup
208a4ce0d7SJeremy L Thompson      uses: actions/checkout@v2
218a4ce0d7SJeremy L Thompson    - name: Rust setup
228a4ce0d7SJeremy L Thompson      uses: actions-rs/toolchain@v1
238a4ce0d7SJeremy L Thompson      with:
248a4ce0d7SJeremy L Thompson        toolchain: stable
258a4ce0d7SJeremy L Thompson    - name: Build documentation
268a4ce0d7SJeremy L Thompson      run: |
278a4ce0d7SJeremy L Thompson        cd rust
288a4ce0d7SJeremy L Thompson        cargo doc --all --no-deps
298a4ce0d7SJeremy L Thompson        touch ./target/doc/.nojekyll
308a4ce0d7SJeremy L Thompson        echo "<meta http-equiv=refresh content=0;url=libceed/index.html>" > ./target/doc/index.html
318a4ce0d7SJeremy L Thompson        cd ..
328a4ce0d7SJeremy L Thompson    - name: Deploy documentation
338a4ce0d7SJeremy L Thompson      uses: peaceiris/actions-gh-pages@v3
348a4ce0d7SJeremy L Thompson      with:
358a4ce0d7SJeremy L Thompson        external_repository: CEED/libCEED-rust-docs
368a4ce0d7SJeremy L Thompson        deploy_key: ${{ secrets.RUST_DOCS_KEY }}
378a4ce0d7SJeremy L Thompson        publish_dir: ./rust/target/doc
38