-
-
Notifications
You must be signed in to change notification settings - Fork 15
51 lines (46 loc) · 1.35 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build docs
on:
push:
branches:
- master
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
# 40 MiB stack
RUST_MIN_STACK: 40971520
RUST_LOG: "citadel=warn"
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Avarok-Cybersecurity/gh-actions-deps@master
- name: Compile documentation
run: cargo make docs
- name: Deploy documentation
if: success()
uses: crazy-max/[email protected]
with:
build_dir: target/doc
target_branch: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
if: success()
with:
ref: gh-pages
- name: Ensure valid redirection
run: |
mv ${GITHUB_WORKSPACE}/citadel_sdk ${GITHUB_WORKSPACE}/docs
echo "<meta http-equiv=\"refresh\" content=\"0; url=docs\">" > ${GITHUB_WORKSPACE}/index.html
git config --global user.name "tbraun96"
git config --global user.email "[email protected]"
git add .
git commit -m "redirection config"
git push
# - uses: katyo/publish-crates@v1
# with:
# registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}