Skip to content

Commit f7543fc

Browse files
add docs ci (#1)
* add docs ci * fix names * fix? * wat * fix? * i can yaml * fix out dir
1 parent 74f429d commit f7543fc

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/docs.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: docs
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
publish:
17+
runs-on: ubuntu-latest
18+
env:
19+
RUSTDOCFLAGS: -Dwarnings
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: dtolnay/rust-toolchain@nightly
23+
- uses: dtolnay/install@cargo-docs-rs
24+
- run: cargo docs-rs --target-dir target
25+
- name: Add index
26+
run: |
27+
echo '<meta http-equiv="refresh" content="0; url=landlock">' > target/x86_64-unknown-linux-gnu/doc/index.html
28+
- name: Deploy to GitHub Pages
29+
if: ${{ github.event_name != 'pull_request' }}
30+
uses: peaceiris/actions-gh-pages@v3
31+
with:
32+
github_token: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
33+
publish_dir: target/x86_64-unknown-linux-gnu/doc

0 commit comments

Comments
 (0)