Skip to content

Commit

Permalink
test: Add comment to test GitHub Actions token
Browse files Browse the repository at this point in the history
  • Loading branch information
haahauge committed Mar 20, 2025
1 parent 5f9e7f3 commit 4e39b92
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Deploy to Development

# Test workflow with ACTIONS token
on:
push:
branches:
Expand All @@ -12,7 +13,8 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3

with:
token: ${{ secrets.ACTIONS }}

- name: Load Environment Variables
uses: falti/dotenv-action@v1.1.4
Expand All @@ -22,19 +24,25 @@ jobs:

- name: Build Docker Image for Frontend
run: |
sudo docker build -t myapp:latest -f frontend/Dockerfile .
cd frontend
sudo docker build -t secfit-frontend:latest .
- name: Stop Existing Container
- name: Stop and Remove Existing Container
run: |
# If a container is running, stop and remove it
docker rm -f myapp_container || true
sudo docker rm -f secfit-frontend || true
- name: Run New Container
run: |
# Run the new container in detached mode.
# Map host port 8080 to container port 3000 (adjust as necessary)
docker run -d --name myapp_container -p 8080:3000 myapp:latest
sudo docker run -d \
--name secfit-frontend \
-p 3000:3000 \
--restart unless-stopped \
-e NODE_ENV=production \
secfit-frontend:latest
- name: Verify Deployment
run: docker ps
run: |
sudo docker ps
echo "Waiting for container to be healthy..."
sleep 10
curl -f http://localhost:3000 || exit 1

0 comments on commit 4e39b92

Please sign in to comment.