fix(docker-compose): fix nginx confige #37
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: CI CD | |
on: | |
push: | |
branches: | |
- main # Replace 'main' with your primary branch name | |
pull_request: | |
branches: | |
- main # Replace 'main' with your primary branch name | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build and run tests | |
run: | | |
docker compose up --build | |
docker exec docker-react-i "npm test" | |
Deploy: | |
name: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Connect | |
uses: appleboy/ssh-action@master | |
with: | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
host: ${{ secrets.HOST }} | |
port: ${{ secrets.PORT }} | |
script: | | |
cd ${{ secrets.PATH }} | |
docker compose stop | |
git pull | |
docker compose restart |