summaryrefslogtreecommitdiffstats
path: root/.github/workflows/build-docs.yml
blob: f729e043997024c36950f674e33c6039cfed4fe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Build documentation

on:
  push:
    branches:
      - master

env:
  BUILD_PATH: ../docs-build

jobs:
  build:
    runs-on: ubuntu-latest
    name: Build and sync latest documentation

    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Set up Python 3.9
        uses: actions/setup-python@v2
        with:
          python-version: 3.9
      - name: Install dependencies
        run: |
          sudo apt install -y graphviz
          pip3 install sphinx-guillotina-theme sphinx
      - name: Build docs
        run: ./build_docs.sh
        working-directory: docs
      - name: Deploy docs
        uses: burnett01/rsync-deployments@4.1
        with:
          switches: -avc --delete
          path: docs-build/
          remote_path: /
          remote_host: ${{ secrets.DOCS_DEPLOY_HOST }}
          remote_user: ${{ secrets.DOCS_DEPLOY_USER }}
          remote_key: ${{ secrets.DOCS_DEPLOY_KEY }}