triggeracvtion

This commit is contained in:
lukas-heilgenbrunner 2024-03-19 21:52:03 +01:00
parent 00506da660
commit 0cc1405717

View File

@ -0,0 +1,41 @@
on:
push:
branches:
- main # Change this to your default branch if it's differ ent
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18 # Use Node.js 18 here
- name: Install dependencies
run: npm install
- name: Build site
run: npm run build
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub - Main web app container registry
uses: docker/login-action@v1
with:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Build and push Main web app container image to registry
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ secrets.USERNAME }}/project:latest
file: ./Dockerfile.prod