Skip to content

Commit 373e290

Browse files
Add GitHub Actions workflow
1 parent 3cdacc0 commit 373e290

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: pages
14+
cancel-in-progress: false
15+
16+
jobs:
17+
docs:
18+
runs-on: ubuntu-latest
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: dtolnay/rust-toolchain@stable
26+
27+
- name: Generate documentation
28+
run: cargo doc --no-deps
29+
30+
- name: Add redirect index.html
31+
run: echo '<meta http-equiv="refresh" content="0;url=log_security_analyzer/index.html">' > target/doc/index.html
32+
33+
- name: Upload Pages artifact
34+
uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: target/doc
37+
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)