feat: rewrite project #15
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
on: | |
push: | |
branches: | |
- main | |
jobs: | |
generate-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Install latest stable rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
default: true | |
override: true | |
- name: Delete existing docs directory | |
run: rm -rf ./docs/ | |
- name: Generate docs | |
run: cargo doc --release --no-deps | |
- name: Create index.html for github pages | |
run: echo "<meta http-equiv=\"refresh\" content=\"0; url=kate\">" > target/doc/index.html | |
- name: Create .nojekyll to stop Jekyll builds | |
run: echo "." > target/doc/.nojekyll | |
- name: Copy generated docs to docs folder | |
run: cp -r ./target/doc ./docs | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: docs | |
clean: true |