-
Notifications
You must be signed in to change notification settings - Fork 20
34 lines (32 loc) · 1.15 KB
/
docs.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
name: Deploy docs to GitHub pages
on:
push:
branches:
- master
- fix_docs_build
jobs:
generate-and-deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Generate docs
run: |
cargo doc --workspace --all-features --release --document-private-items --target-dir ./generated_docs
cd generated_docs/doc
echo '<meta http-equiv="X-Frame-Options" content="deny"><meta http-equiv="Content-Security-Policy" content="default-src 'self' *.bsx.fi"><meta http-equiv="refresh" content="0; url=./basilisk/index.html">' > index.html
echo 'rustdocs.bsx.fi' > ./CNAME
git init
git add -A
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m 'deploy docs'
- name: Deploy docs
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: ./generated_docs/doc