Merge pull request #14 from PoolC/feature #1
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 | |
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 |