-
Notifications
You must be signed in to change notification settings - Fork 42
36 lines (33 loc) · 1.2 KB
/
test-production.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
name: Deploy CI/CD to Test_Production
on:
push: # tells github to run this on any push to the repository
branches:
- test-production
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
timeout-minutes: 90
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Deploy to Staging
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.STAGING_HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.STAGING_KEY }}
port: 22
script: |
cd /home/frappe/test-production/apps/one_fm # we move into our app's folder
# git pull upstream staging # we pull any changes from git
git pull
cd /home/frappe
pip3 install --upgrade frappe-bench
cd /home/frappe/test-production
# bench setup requirements
bench migrate # sync database
bench restart #${{secrets.PASSKEY}}
# we remove any unused dependencies
bench doctor