Browse Source

ci: use gh pages (#5609)

pull/5605/head
Marko 4 years ago
committed by GitHub
parent
commit
0e9798f39f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 1 deletions
  1. +31
    -0
      .github/workflows/docs.yml
  2. +12
    -1
      Makefile

+ 31
- 0
.github/workflows/docs.yml View File

@ -0,0 +1,31 @@
name: Documentation
# This job builds and deploys documenation to github pages.
# It runs on every push to master.
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: tendermintdev/docker-website-deployment
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
with:
persist-credentials: false
fetch-depth: 0
- name: Install and Build 🔧
run: |
apk add rsync
make build-gh-docs
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ~/output

+ 12
- 1
Makefile View File

@ -192,7 +192,7 @@ DESTINATION = ./index.html.md
###############################################################################
### Documentation ###
###############################################################################
# todo remove once tendermint.com DNS is solved
build-docs:
@cd docs && \
while read -r branch path_prefix; do \
@ -203,6 +203,17 @@ build-docs:
done < versions ;
.PHONY: build-docs
build-gh-docs:
@cd docs && \
while read -r branch path_prefix; do \
(git checkout $${branch} && npm install && VUEPRESS_BASE="/tendermint/$${path_prefix}/" npm run build) ; \
mkdir -p ~/output/$${path_prefix} ; \
cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
cp ~/output/$${path_prefix}/index.html ~/output ; \
done < versions ;
.PHONY: build-docs
# todo remove once tendermint.com DNS is solved
sync-docs:
cd ~/output && \
echo "role_arn = ${DEPLOYMENT_ROLE_ARN}" >> /root/.aws/config ; \


Loading…
Cancel
Save