ci: Add GitHub Actions for documentation deployment (#11540)
* Add GitHub Actions for documentation deployment * Only update when docs change * delete midnight build
This commit is contained in:
parent
8b32094d1b
commit
2822f71b77
|
@ -0,0 +1,33 @@
|
|||
name: Deploy Documentation
|
||||
# This job builds and deploys documenation to github pages.
|
||||
# It runs on every push to master with a change in the docs folder.
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- "docs/**"
|
||||
|
||||
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/github-pages-deploy-action@v4.3.0
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: docs/output
|
||||
single-commit: true
|
|
@ -14,6 +14,7 @@ private
|
|||
# Build
|
||||
vendor
|
||||
build
|
||||
docs/output
|
||||
docs/_build
|
||||
docs/tutorial
|
||||
docs/node_modules
|
||||
|
|
6
Makefile
6
Makefile
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue