-
-
Notifications
You must be signed in to change notification settings - Fork 90
46 lines (39 loc) · 1.19 KB
/
build_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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: build/deploy training.plone.org
on:
push:
branches:
- "main"
workflow_dispatch:
jobs:
build_deploy:
runs-on: ubuntu-latest
environment:
name: training.plone.org
url: https://training.plone.org
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -q -r requirements.txt -c constraints.txt
pip freeze
- name: Prepare deploy
run: make deploy
- name: Deploy to server
id: deploy
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{secrets.DEPLOY_KEY_TRAINING}}
with:
flags: "-avzr --delete"
options: ""
ssh_options: "-p ${{vars.DEPLOY_PORT_TRAINING}}"
src: "_build/html/"
dest: "${{vars.DEPLOY_USER_TRAINING}}@${{vars.DEPLOY_SERVER_TRAINING}}:${{vars.DEPLOY_PATH_TRAINING}}"
- name: Display status from deploy
run: echo "${{ steps.deploy.outputs.status }}"