-
Notifications
You must be signed in to change notification settings - Fork 14
56 lines (46 loc) · 1.23 KB
/
deploy.yaml
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
49
50
51
52
53
54
55
---
name: deploy web-page
# Change this to whatever you want
on:
push:
tags:
- 'v*'
schedule:
# every friday @ 19:21
- cron: '21 19 * * FRI'
workflow_dispatch:
env:
PS_INCLUDE_TODOS: false
jobs:
build_docs:
uses: ./.github/workflows/create-doc.yaml
with:
name: docs
targz_name: docs.tar.gz
deploy_docs_first:
name: Deploy to pythonsupport.dtu.dk
needs: [build_docs]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: docs
- name: Deployment -- rsync
uses: Burnett01/rsync-deployments@6.0.0
with:
switches: -vr --delete
path: docs.tar.gz
remote_path: ${{ secrets.DEPLOY_PATH }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY_PRIVATE }}
- name: Access and unpack
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY_PRIVATE }}
script: |
cd ${{ secrets.DEPLOY_PATH }}
tar xfz docs.tar.gz
rm docs.tar.gz