File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy
2+ on :
3+ push :
4+ branches : [main]
5+ permissions :
6+ contents : write
7+ pages : write
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ - run : |
14+ if [ -f "book/book.toml" ]; then
15+ curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.36/mdbook-v0.4.36-x86_64-unknown-linux-gnu.tar.gz | tar xz
16+ cd book && ../mdbook build
17+ fi
18+ mkdir -p dist
19+ if [ -d "book/book" ]; then cp -r book/book/* dist/; fi
20+ if [ -d "build" ]; then cp -r build/* dist/; fi
21+ if [ -d "docs" ]; then cp -r docs/* dist/; fi
22+ echo "# Deployed $(date)" > dist/index.html 2>/dev/null || true
23+ - uses : peaceiris/actions-gh-pages@v3
24+ with :
25+ github_token : ${{ secrets.GITHUB_TOKEN }}
26+ publish_dir : dist
You can’t perform that action at this time.
0 commit comments