Skip to content

Merge pull request #671 from galacticcouncil/opengov_tweaks #185

Merge pull request #671 from galacticcouncil/opengov_tweaks

Merge pull request #671 from galacticcouncil/opengov_tweaks #185

Workflow file for this run

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