Merge pull request #403 from osscameroon/deploy-using-docker #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: api stage deployment | |
on: | |
push: | |
paths: | |
- .github/workflows/stage-api-deploy.yaml | |
- api/** | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: api/ | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Executing remote command | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.DROPLET_HOST }} | |
username: ${{ secrets.DROPLET_DEPLOY_USERNAME }} | |
key: ${{ secrets.DROPLET_DEPLOY_SSHKEY }} | |
script: cd /home/deploy/caparledev-website/stage/caparledev-website/ && git stash; git pull --rebase origin main; git stash apply && sudo systemctl restart stage-osscameroon-api |