Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add GitHub Actions for documentation deployment #11540

Merged
merged 3 commits into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy Documentation
# This job builds and deploys documenation to github pages.
# It runs on every push to master.
on:
push:
branches:
- main
schedule:
julienrbrt marked this conversation as resolved.
Show resolved Hide resolved
- cron: "* 0 * * *"

jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: tendermintdev/docker-website-deployment
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0

- name: Install and Build 🔧
run: |
apk add rsync
make build-docs LEDGER_ENABLED=false

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/output
single-commit: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ private
# Build
vendor
build
docs/output
docs/_build
docs/tutorial
docs/node_modules
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ build-docs:
while read -r branch path_prefix; do \
echo "building branch $${branch}" ; \
(git clean -fdx && git reset --hard && git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \
mkdir -p ~/output/$${path_prefix} ; \
cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
cp ~/output/$${path_prefix}/index.html ~/output ; \
mkdir -p output/$${path_prefix} ; \
cp -r .vuepress/dist/* output/$${path_prefix}/ ; \
cp output/$${path_prefix}/index.html output ; \
done < versions ;

.PHONY: build-docs
Expand Down
Empty file added docs/output/.gitkeep
Empty file.