-
Notifications
You must be signed in to change notification settings - Fork 30
48 lines (40 loc) · 1.2 KB
/
Copy pathdocumentation.yaml
File metadata and controls
48 lines (40 loc) · 1.2 KB
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
39
40
41
42
43
44
45
46
47
48
name: Update Documentation
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs
- name: Build documentation
run: mkdocs build
- name: Copy files to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.DOC_SERVER_HOST }}
username: ${{ secrets.DOC_SERVER_USERNAME }}
key: ${{ secrets.DOC_SERVER_SSH_KEY }}
source: "docs/build/"
target: "/var/www/docs.prancer.io/public_html/"
strip_components: 2
- name: Run commands on server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DOC_SERVER_HOST }}
username: ${{ secrets.DOC_SERVER_USERNAME }}
key: ${{ secrets.DOC_SERVER_SSH_KEY }}
script: |
cd /var/www/docs.prancer.io/public_html
# add the commands to update the files here
find -user azureuser -exec chmod g+w {} \;