Skip to content

Commit

Permalink
Update rust.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Cr0a3 authored Jul 8, 2024
1 parent 0dca013 commit c6622ce
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,24 @@ jobs:
run: cargo check --all
- name: Run tests
run: cargo test --all
- name: Build docs
run: cargo doc --no-deps
- name: Deploy docs to doc branch
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git clone --branch=doc https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git doc
rsync -av target/doc/ doc/
cd doc
git add --all
git commit -m 'Update documentation'
git push origin doc
doc:
name: Documentation
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- uses: KyleMayes/install-llvm-action@v1
with:
version: ${{ env.DOC_LLVM_VERSION }}
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@nightly
- name: Build Documentation
run: cargo +nightly doc --features ${{ env.DOC_LLVM_FEATURE }},nightly --verbose --no-deps
- name: Doc Index Page Redirection
run: echo '<meta http-equiv="refresh" content="1; url=Ygen/index.html">' > ${{ env.DOC_PATH }}/index.html
- name: Deploy Documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.DOC_PATH }}
force_orphan: true

0 comments on commit c6622ce

Please sign in to comment.