changeinReadmefile #4
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: Deploy server | |
on: | |
push: | |
branches: | |
- master | |
defaults: | |
run: | |
working-directory: ./server | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Deploy server | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.DROPLET_HOST }} | |
username: ${{ secrets.DROPLET_USER }} | |
key: ${{ secrets.DROPLET_PRIVATE_KEY }} | |
script_stop: true | |
script: | | |
export UPSTASH_REDIS_REST_URL=${{ secrets.UPSTASH_REDIS_REST_URL }} | |
export CORS_ORIGIN=${{ secrets.CORS_ORIGIN }} | |
cd scalable-chat-app | |
git pull | |
cd server | |
docker-compose down | |
docker-compose --project-name chat up -d --build | |