Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ jobs:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}

deploy:
name: Deploy to Production
build-and-push:
name: Build and push to Docker Hub
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
Expand All @@ -86,14 +86,19 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
node-version: "20"
cache: "npm"
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Install dependencies
run: npm ci --omit=dev
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/notifierapi:latest

- name: Deploy to Production
run: echo "Deploying to production..."
- name: Deployed to Docker Hub
run: echo "Deployed to Docker Hub"
Loading