Update README.md #5
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: Docs | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: Generate Docs | |
run: cargo doc --no-deps | |
- name: Prepare docs for deployment | |
run: | | |
mkdir gh-pages | |
echo "<meta http-equiv=\"refresh\" content=\"0; url=Peng\index.html\">" > target/doc/index.html | |
mv target/doc/* gh-pages/ | |
touch gh-pages/.nojekyll | |
- name: Deploy Docs | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./gh-pages | |
force_orphan: true |