-
Notifications
You must be signed in to change notification settings - Fork 54
30 lines (30 loc) · 1.18 KB
/
deploy.yml
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
name: Deployment
on:
push:
branches:
- "[0-9]+.[0-9]+"
jobs:
build:
name: Build
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: Install requirements
run: |
sudo apt-get install --no-install-recommends graphviz
pip install -r requirements.txt
- name: Build HTML manual
run: |
sphinx-build -a -j auto -d _doctrees -D html_absolute_url_root=/ -D html_link_suffix= -D version=$(basename ${{ github.ref }}) -A version=$(basename ${{ github.ref }}) -A github_version=$(basename ${{ github.ref }}) -A theme_canonical_url=https://docs.panda3d.org/$(basename ${{ github.ref }})/ -A theme_display_header=true . _html
- name: Sync to server
run: |
echo "${{ secrets.SSH_IDENTITY }}" > id_rsa
chmod 600 id_rsa
rsync -vzr --delete-after -e 'ssh -l ${{ secrets.SSH_USER }} -p ${{ secrets.SSH_PORT }} -i id_rsa -o StrictHostKeyChecking=no' _html/ "panda3d.org:$(basename ${{ github.ref }})/"
rm -f id_rsa