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