mitlist/.gitea/workflows/deploy-prod.yml
mohamad ce67570cfb feat: Update deployment workflow and enhance ListDetailPage functionality
- Modified the production deployment workflow to trigger on pushes to the 'prod' branch and updated Docker registry login to use Gitea Container Registry.
- Enhanced ListDetailPage.vue to improve loading states and error handling, introducing a new loading mechanism for items and utilizing session storage for cached data.
- Implemented Intersection Observer for pre-fetching list details to optimize user experience during navigation.
- Improved touch feedback for list cards and optimized styles for mobile responsiveness.
2025-05-31 14:08:40 +02:00

45 lines
1.9 KiB
YAML

name: Deploy to Production, build images and push to Gitea Registry
on:
push:
branches:
- prod # Trigger deployment only on pushes to main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Gitea Container Registry
uses: docker/login-action@v2
with:
registry: git.vinylnostalgia.com:5000 # IMPORTANT: Verify this is your Gitea registry URL (e.g., git.vinylnostalgia.com or with a different port).
username: ${{ gitea.actor }} # Uses the user that triggered the action. You can replace with 'mo' if needed.
password: ${{ secrets.GITEA_TOKEN }} # IMPORTANT: Create a Gitea repository secret named GITEA_TOKEN with your password or access token.
- name: Build and push backend image to Gitea Registry
uses: docker/build-push-action@v4
with:
context: ./be
file: ./be/Dockerfile.prod
push: true
tags: git.vinylnostalgia.com:5000/${{ gitea.repository_owner }}/${{ gitea.repository_name }}-backend:latest # IMPORTANT: Verify registry URL matches the login step.
# Ensure gitea.repository_owner and gitea.repository_name resolve as expected for your image path.
- name: Build and push frontend image to Gitea Registry
uses: docker/build-push-action@v4
with:
context: ./fe
file: ./fe/Dockerfile.prod
push: true
tags: git.vinylnostalgia.com:5000/${{ gitea.repository_owner }}/${{ gitea.repository_name }}-frontend:latest # IMPORTANT: Verify registry URL matches the login step.
# Ensure gitea.repository_owner and gitea.repository_name resolve as expected for your image path.
build-args: |
VITE_API_URL=${{ secrets.VITE_API_URL }}
VITE_SENTRY_DSN=${{ secrets.VITE_SENTRY_DSN }}