mirror of
https://github.com/sayanarijit/xplr
synced 2024-11-14 18:12:54 +00:00
36 lines
814 B
YAML
36 lines
814 B
YAML
name: Book
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'docs/**'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy_en:
|
|
name: Deploy book on gh-pages
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Install mdBook
|
|
uses: peaceiris/actions-mdbook@v1
|
|
- name: Render book
|
|
run: |
|
|
mdbook build -d gh-pages docs/en
|
|
mkdir gh-pages
|
|
mv docs/en/gh-pages gh-pages/en
|
|
mv docs/index.html gh-pages
|
|
mv docs/CNAME gh-pages
|
|
- name: Deploy
|
|
uses: peaceiris/actions-gh-pages@v2.5.1
|
|
with:
|
|
emptyCommits: true
|
|
keepFiles: false
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PUBLISH_BRANCH: gh-pages
|
|
PUBLISH_DIR: gh-pages
|