Skip to content

Align cells in the UserLinks table #60

Align cells in the UserLinks table

Align cells in the UserLinks table #60

Workflow file for this run

name: Deploy App
on:
push:
branches:
- main # or your deployment branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get previous commit hash
id: get_last_commit
run: echo "::set-output name=hash::$(git rev-parse HEAD^1)"
- name: Get changelog from commits
id: changelog
run: |
echo "::set-output name=changelog::$(git log --pretty=format:'%h - %s' ${{ steps.get_last_commit.outputs.hash }}..HEAD)"
- name: Copy repository to SFTP
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SFTP_HOST }}
username: ${{ secrets.SFTP_USER }}
password: ${{ secrets.SFTP_PASSWORD }}
port: ${{ secrets.SFTP_PORT }}
source: '.'
target: '/opt/route'
- name: Build and deploy Docker container
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SFTP_HOST }}
username: ${{ secrets.SFTP_USER }}
password: ${{ secrets.SFTP_PASSWORD }}
port: ${{ secrets.SFTP_PORT }}
script: |
cd '/opt/route'
# Overwrite the .env file to recreate it during each deployment
rm -f .env
echo "AUTH_SECRET=${{ secrets.AUTH_SECRET }}" >> .env
echo "CLIENT_ID=${{ secrets.CLIENT_ID }}" >> .env
echo "CLIENT_SECRET=${{ secrets.CLIENT_SECRET }}" >> .env
echo "DATABASE_URL=${{ secrets.DATABASE_URL }}" >> .env
echo "AUTH_TRUST_HOST=${{ secrets.AUTH_TRUST_HOST }}" >> .env
#Prisma
npx prisma generate
docker build -t route .
docker stop route || true
docker rm route || true
docker run -d --name route --restart always --env-file .env -p 3002:3000 route
- name: Send Discord notification
run: |
curl -H "Content-Type: application/json" \
-X POST \
-d '{
"content": "## New deployment for '${{ github.repository }}'\n\n**Branch**: `${{ github.ref }}`\n**Commit Message**: `${{ github.event.head_commit.message }}`\n**Committer**: `${{ github.event.head_commit.committer.name }}`\n**[View Changes](${{ github.event.head_commit.url }})**"
}' \
${{ secrets.DISCORD_WEBHOOK }}