forked from smithy-lang/smithy-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.29 KB
/
github-pages.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
on:
workflow_dispatch:
push:
branches: [main]
paths:
- design/**
name: Update GitHub Pages
env:
rust_version: 1.70.0
# Allow only one doc pages build to run at a time for the entire smithy-rs repo
concurrency:
group: github-pages-yml
cancel-in-progress: true
jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.rust_version }}
- name: Generate docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.name "AWS SDK Rust Bot"
git config --local user.email "[email protected]"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}
git fetch origin github-pages
pushd design &>/dev/null
cargo install mdbook
cargo install --locked mdbook-mermaid
mdbook build --dest-dir ../../output
popd &>/dev/null
git checkout origin/github-pages -b github-pages
rm -rf design
mv ../output design
git add design
git commit -m "Update design docs"
git push origin github-pages