Skip to content

Commit

Permalink
ci: add github workflows for staging and deps chekcs
Browse files Browse the repository at this point in the history
  • Loading branch information
PromiseFru committed Oct 23, 2024
1 parent 531761d commit 1775aa2
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 99
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 99
allow:
- dependency-type: "direct"
- dependency-type: "indirect"
55 changes: 55 additions & 0 deletions .github/workflows/staging-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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 gateway_client_remote; then
echo "❌ Error updating repository!"
exit 1
fi
echo "==============================="
echo "✅ Repository update complete"
echo "==============================="
echo "========================="
echo "Building project ..."
echo "========================="
if ! assembler deploy --project gateway_client_remote; 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 "============================="

0 comments on commit 1775aa2

Please sign in to comment.