CI: push documentation site to the main repo

This commit is contained in:
Oleg Kalachev
2021-05-29 06:11:29 +03:00
parent 563e5acad6
commit 6b0bb41564

View File

@@ -35,7 +35,7 @@ jobs:
gitbook install
gitbook build
- name: Generate PDF
if: ${{ github.repository == 'CopterExpress/clover' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: |
for i in 1 2 3 4; do gitbook pdf ./ _book/clover.pdf && break || sleep 1; done
sudo apt-get -q install ghostscript
@@ -46,11 +46,9 @@ jobs:
ls -lah _book/clover*.pdf
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.3
if: ${{ github.repository == 'CopterExpress/clover' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
branch: gh-pages
folder: _book
repository-name: CopterExpress/clover.coex.tech
token: ${{ secrets.DOCS_DEPLOY_TOKEN }}
clean: true
single-commit: true # to avoid multiple copies of large pdf files