Skip to content

Update nginx.conf

Update nginx.conf #3

name: Deploy to GHCR
on:
push:
branches:
- main # Adjust this if you want to deploy from a different branch
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '20' # Assicurati che questa versione corrisponda al tuo progetto
- name: Install dependencies and build project
run: |
npm install
npm run build # Questo passaggio dovrebbe generare la directory `build`
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: . # Assicurati che il contesto sia configurato correttamente
push: true
tags: ghcr.io/${{ github.repository_owner }}/magesgate-com:${{ github.sha }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
file: ./Dockerfile