(fix) docker compose #21
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 to Server | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup SSH | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: executing remote ssh commands using password and pull the latest code | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SERVER_IP }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
cd ~/projects/uniride | |
if [ ! -d "./authService" ]; then | |
git clone https://${{ secrets.TOKEN_REPO }}:[email protected]/NoSleepFullBuild/Uniride-authService.git | |
fi | |
cd authService | |
cat .env | |
git fetch | |
git checkout develop | |
git pull origin develop | |
- name: Install package from private repository | |
run: npm install git+https://${{ secrets.TOKEN_REPO }}:[email protected]/nosleepfullbuild/uniride-library.git | |
- name: Build and deploy Docker containers | |
run: | | |
ls -la | |
docker-compose up -d --build | |