Create deploy-docs.yml
This commit is contained in:
parent
c163ed70f2
commit
dc29597b60
30
.github/workflows/deploy-docs.yml
vendored
Normal file
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
|
Loading…
x
Reference in New Issue
Block a user