Merge pull request #654 from galacticcouncil/state_trie_migration #175
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Install misc dependencies | |
run: sudo rm /var/lib/dpkg/lock-frontend && sudo rm /var/lib/dpkg/lock && sudo apt-get install -y protobuf-compiler m4 | |
- 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 |