Merge pull request #74 from PoolC/master #28
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: web client deploy production | |
on: | |
push: | |
branches: [release/web-client] | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
environment: production # @TODO.. rename to 'web-client-deploy-production' | |
steps: | |
- name: clone and execute | |
uses: appleboy/ssh-action@v1.0.0 | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_PEM_KEY }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
DIRECTORY=dialga | |
if [ -d "$DIRECTORY" ] | |
then | |
cd "$DIRECTORY/Dialga" | |
else | |
mkdir $DIRECTORY | |
cd $DIRECTORY | |
git clone https://github.com/PoolC/Dialga.git | |
cd Dialga | |
fi | |
BRANCH=release/web-client | |
git branch -c $BRANCH | |
git checkout $BRANCH | |
git pull origin $BRANCH || exit 1 | |
docker compose -f=./apps/web-client/deploy-app/docker-compose.yml down | |
docker compose -f=./apps/web-client/deploy-app/docker-compose.yml up -d --build |