-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from DoESLiverpool/feature/48-deploy-on-push-t…
…o-production Initial attempt at a deploy github action
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
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
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 |