Create deploy-docs.yml

This commit is contained in:
Janek 2023-12-30 19:13:14 +01:00 committed by GitHub
parent c163ed70f2
commit dc29597b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

30
.github/workflows/deploy-docs.yml vendored Normal file

@ -0,0 +1,30 @@
name: Deploy Docs to GitHub Pages
on:
push:
branches:
- main # Adjust this branch name if needed
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Rust
uses: actions/setup-rust@v1
- name: Build Docs
run: |
cargo doc --no-deps
rm -rf ./docs
echo "<meta http-equiv=\"refresh\" content=\"0; url=csflow/index.html\">" > target/doc/index.html
cp -r target/doc ./docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs