debug #31
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
# Workflow to deploy to a DC server via SSH over RSA | |
name: deploy | |
# on: [push ] | |
# Triggers the workflow on push to main branch | |
on: | |
push: | |
branches: [ develop ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
pull-n-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Execute Commands on Remote Server | |
uses: appleboy/ssh-action@master | |
with: | |
host: dev.assistant.bible | |
username: root | |
key: ${{ secrets.DEV_SIL_SSH_KEY }} | |
port: 22 | |
script_stop: true | |
script: | | |
echo "Debug: Switched to assistant-bible user" | |
cd /home/assistant-bible/assistant.bible | |
echo "Debug: Changed directory to /home/assistant-bible/assistant.bible" | |
git status | |
echo "Debug: git status run" | |
ssh -o StrictHostKeyChecking=no -T [email protected] # Test SSH connection to GitHub | |
echo "Debug: SSH connection test to GitHub completed" | |
git pull origin develop | |
echo "Debug: Git pull command executed" | |
echo "Debug: Starting SSH script" | |
su - assistant-bible | |
cd deployment | |
echo "Debug: Changed directory to deployment" | |
docker compose --env-file .env up --force-recreate --build -d | |
echo "Debug: Docker compose command executed" | |