Skip to content

feat: Fetch proto from branch-specific URLs. #3

feat: Fetch proto from branch-specific URLs.

feat: Fetch proto from branch-specific URLs. #3

name: Staging Server Build Pipeline
on:
push:
branches:
- staging
jobs:
deploy:
name: Deploy to Staging Server
runs-on: ubuntu-latest
environment:
name: staging
steps:
- name: Execute Remote SSH Commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
set -e
echo "============================"
echo "Updating repository ..."
echo "============================"
if ! assembler clone --branch staging --project bridge_server; then
echo "❌ Error updating repository!"
exit 1
fi
echo "==============================="
echo "✅ Repository update complete"
echo "==============================="
echo "========================="
echo "Building project ..."
echo "========================="
if ! assembler deploy --project bridge_server; then
echo "❌ Error building project!"
exit 1
fi
echo "==========================="
echo "✅ Project build complete"
echo "==========================="
echo "============================="
echo "Cleaning up staging builds ..."
echo "============================="
if ! ${{ secrets.CLEANUP_CMD }}; then
echo "❌ Error cleaning up builds!"
exit 1
fi
echo "============================="
echo "✅ Cleanup complete"
echo "============================="