Skip to content

Merge pull request #14 from PoolC/feature #1

Merge pull request #14 from PoolC/feature

Merge pull request #14 from PoolC/feature #1

name: deploy
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-22.04
environment: production
steps:
- uses: actions/checkout@v2
- name: clone and execute
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
DIRECTORY=dialga
if [ ! -d "$DIRECTORY" ]; then
mkdir $DIRECTORY
fi
cd $DIRECTORY
git clone https://github.com/PoolC/Dialga.git
ENV_PRODUCTION=.env.production
echo "VITE_API_BASE_URL=$secrets.VITE_API_BASE_URL" > $ENV_PRODUCTION
echo "VITE_FILE_URL=$secrets.VITE_FILE_URL" > $ENV_PRODUCTION
echo "VITE_MAX_FILE_SIZE=$secrets.VITE_MAX_FILE_SIZE" > $ENV_PRODUCTION
docker-compose down
docker-compose up -d --build