-
Notifications
You must be signed in to change notification settings - Fork 4
33 lines (30 loc) · 1.07 KB
/
sandbox.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
name: Deploy CI/CD to Sandbox
on:
push: # tells github to run this on any push to the repository
branches:
- sandbox
# 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: 30
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Deploy to Sandbox
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SANDBOX_HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SANDBOX_KEY }}
port: 22
script: |
cd /home/frappe/frappe-bench/apps/one_wiki # we move into our app's folder
git pull upstream sandbox # we pull any changes from git
cd /home/frappe/frappe-bench
bench setup requirements
bench build
bench migrate # sync database
bench restart # we remove any unused dependencies
bench doctor