Skip to content

new deploy prod server #21

new deploy prod server

new deploy prod server #21

Workflow file for this run

name: 'new deploy prod server'
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: run on server
uses: garygrossgarten/github-action-ssh@release
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
password: ${{ secrets.SERVER_PASSWORD }}
command: |
cd /home/app/new_procollab_deploy &&
git pull origin master &&
rm -f .env &&
touch .env &&
echo "DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }}" >> .env &&
echo "DATABASE_NAME=${{ secrets.DATABASE_NAME }}" >> .env &&
echo "DATABASE_PASSWORD=${{ secrets.DATABASE_PASSWORD }}" >> .env &&
echo "DATABASE_USER=${{ secrets.DATABASE_USER }}" >> .env &&
echo "DATABASE_HOST=${{ secrets.DATABASE_HOST }}" >> .env &&
echo "DATABASE_PORT=${{ secrets.DATABASE_PORT }}" >> .env &&
echo "EMAIL_USER=${{ secrets.EMAIL_USER }}" >> .env &&
echo "EMAIL_PASSWORD=${{ secrets.EMAIL_PASSWORD }}" >> .env &&
echo "EMAIL_HOST=${{ secrets.EMAIL_HOST }}" >> .env &&
echo "EMAIL_PORT=${{ secrets.EMAIL_PORT }}" >> .env &&
echo "SELECTEL_ACCOUNT_ID=${{ secrets.SELECTEL_ACCOUNT_ID }}" >> .env &&
echo "SELECTEL_CONTAINER_NAME=${{ secrets.SELECTEL_CONTAINER_NAME }}" >> .env &&
echo "SELECTEL_CONTAINER_PASSWORD=${{ secrets.SELECTEL_CONTAINER_PASSWORD }}" >> .env &&
echo "SELECTEL_CONTAINER_USERNAME=${{ secrets.SELECTEL_CONTAINER_USERNAME }}" >> .env &&
echo "CLICKUP_API_TOKEN=${{ secrets.CLICKUP_API_TOKEN }}" >> .env &&
echo "CLICKUP_SPACE_ID=${{ secrets.CLICKUP_SPACE_ID }}" >> .env &&
echo "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env &&
echo "UNISENDER_GO_API_KEY=${{ secrets.UNISENDER_GO_API_KEY }}" >> .env &&
docker compose -f docker-compose.prod-ci.yml -p prod up -d --build