chore: displaying auth token for debugging purposes #99
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: Backend Deployment | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up SSH connection | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Update and restart containers | |
uses: appleboy/[email protected] | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
with: | |
host: ${{ secrets.SERVER_HOST }} | |
username: ${{ secrets.SERVER_USERNAME }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
envs: SENTRY_AUTH_TOKEN | |
script: | | |
echo Using Sentry token: $SENTRY_AUTH_TOKEN | |
echo $SENTRY_AUTH_TOKEN | cut -c -10 | |
cd /home/ubuntu/.docker/datsmysong | |
git pull | |
docker-compose down | |
docker-compose up -d --force-recreate --build |