Skip to content

Merge pull request #35 from ONE-F-M/staging #27

Merge pull request #35 from ONE-F-M/staging

Merge pull request #35 from ONE-F-M/staging #27

Workflow file for this run

name: Deploy CI/CD to
on:
push: # tells github to run this on any push to the repository
branches:
- staging
# 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/frappe-bench/apps/one_wiki # we move into our app's folder
git pull upstream staging # we pull any changes from git
cd /home/frappe/frappe-bench
bench restart ${{secrets.PASSKEY}}
# bench setup requirements
bench build --app one_wiki
bench clear-cache
bench clear-website-cache
bench migrate # sync database
# we remove any unused dependencies
bench doctor
bench restart ${{secrets.PASSKEY}}