8d85589f0c
CI/CD Pipeline / Build & Deploy (push) Failing after 24s
Gitea Actions runner has filesystem mount issue preventing Node.js extraction. Solution: Build entire image with Docker (includes Node) instead of setup-node action. Simpler and more reliable - build happens inside container.
29 lines
780 B
YAML
29 lines
780 B
YAML
name: CI/CD Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
name: Build & Deploy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build and Push Docker Image
|
|
run: |
|
|
# Login to registry
|
|
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login gitlab.impresion3d.pro -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
|
|
|
# Build image
|
|
docker build -t gitlab.impresion3d.pro/root/davidaragon-portfolio:latest .
|
|
|
|
# Push to registry
|
|
docker push gitlab.impresion3d.pro/root/davidaragon-portfolio:latest
|
|
|
|
- name: Deploy to Portainer
|
|
run: |
|
|
curl -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}"
|