Skip to content

Commit

Permalink
Merge pull request #49 from DoESLiverpool/feature/48-deploy-on-push-t…
Browse files Browse the repository at this point in the history
…o-production

Initial attempt at a deploy github action
  • Loading branch information
amcewen authored Dec 7, 2021
2 parents 7ecd3a0 + c8d742e commit 9e7f231
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/deploy-to-production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy to production server when master is updated

on:
push:
branches: [ master ]

# Allow it to be run manually from the Github Actions tab
workflow_dispatch:

jobs:
# We should add a job to run the tests first...

deploy:
name: Deploy to organisers.doesliverpool.com
runs-on: ubuntu-latest

steps:
- name: Do deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST_PROD }}
username: ${{ secrets.REMOTE_USER_PROD }}
key: ${{ secrets.SSH_PRIVATE_KEY_PROD }}
port: 22
script: |
cd optimism
git pull
docker-compose build
docker-compose restart

0 comments on commit 9e7f231

Please sign in to comment.