-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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,31 @@ | ||
name: Deploy to dev server | ||
|
||
# when dev image build action is completed, run this action | ||
on: | ||
workflow_run: | ||
workflows: ["Build docker image on push to develop"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
if_workflow_success: | ||
name: Deploy to dev server | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
|
||
steps: | ||
- name: executing remote ssh commands using password | ||
uses: appleboy/ssh-action@v1.0.0 | ||
with: | ||
host: ${{ secrets.HOST }} | ||
port: ${{ secrets.PORT }} | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
proxy_host: ${{ secrets.PROXY_HOST }} | ||
proxy_port: ${{ secrets.PROXY_PORT }} | ||
proxy_username: ${{ secrets.PROXY_USERNAME }} | ||
proxy_password: ${{ secrets.PROXY_PASSWORD }} | ||
script: | | ||
docker pull ghcr.io/sparcs-kaist/zabo-front:dev | ||
docker rm -f zabo-front | ||
docker run --restart always -d -p 15081:80 --name zabo-front ghcr.io/sparcs-kaist/zabo-front:dev |