Update book

This commit is contained in:
sunli 2020-04-15 12:26:40 +08:00
parent 746cde8f40
commit cdcd1ae0e3
2 changed files with 37 additions and 3 deletions

View File

@ -4,9 +4,13 @@ on:
pull_request:
branches:
- master
paths:
- 'docs/**'
push:
branches:
- master
paths:
- 'docs/**'
jobs:
deploy_en:
@ -20,12 +24,17 @@ jobs:
- name: Render book
run: |
mdbook build -d gh-pages docs/en
mdbook build -d gh-pages docs/zh-CN
mkdir gh_pages
mv docs/en/gh-pages gh_pages/en
mv docs/zh-CN/gh-pages gh_pages/zh-CN
mv docs/index.html gh_pages
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.5.1
with:
emptyCommits: false
keepFiles: true
emptyCommits: true
keepFiles: false
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: docs/en/gh-pages
PUBLISH_DIR: docs/gh-pages

25
docs/index.html Normal file
View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>Async-graphql Book</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<style>
div {
margin: 20px;
font-size: 24pt;
}
</style>
</head>
<body>
<div>
<a href="en/index.html">English</a>
</div>
<div>
<a href="zh-CN/index.html">简体中文</a>
</div>
</body>
</html>