From e91966c8f87a632bbc9740e5302f0011e1341d01 Mon Sep 17 00:00:00 2001 From: faris Aljohari <83524184+farisaljohari@users.noreply.github.com> Date: Sun, 13 Jul 2025 22:37:27 -0600 Subject: [PATCH] Add production deployment GitHub Action --- .github/workflows/production.yml | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/production.yml diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml new file mode 100644 index 0000000..0d26e32 --- /dev/null +++ b/.github/workflows/production.yml @@ -0,0 +1,37 @@ +name: 🚀 Production Deployment + +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: ⬇️ Checkout Code + uses: actions/checkout@v4 + + - name: 🐢 Set up Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: 🐳 Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: 🔐 Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: me-central-1 + + - name: 📦 Install Dependencies + run: npm install + + - name: 🛠️ Run Production Build & Deploy Script + run: | + chmod +x ./build.sh + ./build.sh