All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 45s
26 lines
771 B
YAML
26 lines
771 B
YAML
name: Build and Deploy
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest # Runner must have Docker socket mounted
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24'
|
|
cache: 'npm'
|
|
- run: npm ci && npm run build
|
|
|
|
- name: Build and run container
|
|
run: |
|
|
docker build -t cachetdeco:latest .
|
|
docker stop cachetdeco 2>/dev/null || true
|
|
docker rm cachetdeco 2>/dev/null || true
|
|
docker run -d --name cachetdeco -p 30001:4321 --restart unless-stopped \
|
|
-e RESEND_API_KEY=${{ secrets.RESEND_API_KEY }} \
|
|
cachetdeco:latest |