Files
gremiumhub/.gitea/workflows/deploy.yaml

37 lines
947 B
YAML

name: Deploy to Production
run-name: ${{ gitea.actor }} triggered deployment on ${{ gitea.ref_name }}
on:
workflow_run:
workflows: ["Frontend CI/CD", "Backend CI/CD"]
types:
- completed
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ gitea.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup SSH
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "${{ secrets.SYNOLOGY_DEPLOY_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
- name: Deploy to server
run: |
ssh -p 32766 -o StrictHostKeyChecking=accept-new deploy@ds218 'sudo /usr/local/bin/deployLegalconsenthub.sh'
- name: Deployment successful
run: |
echo "✅ Deployment triggered successfully"
echo "🚀 Application is being deployed to production"