You've already forked reloading-manager
frontend-build (#5)
Reviewed-on: rrise/reloading-manager#5 Co-authored-by: Ron Rise <ron@siteworxpro.com> Co-committed-by: Ron Rise <ron@siteworxpro.com>
This commit is contained in:
@@ -1,11 +1,42 @@
|
|||||||
on:
|
on:
|
||||||
create:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- '**'
|
||||||
|
|
||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
BuildFrontend:
|
||||||
|
name: Build Frontend
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Add Siteworx CA
|
||||||
|
run: |
|
||||||
|
apt update && apt install -yq ca-certificates curl
|
||||||
|
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
|
||||||
|
update-ca-certificates
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '22.14.0'
|
||||||
|
- name: Build Container
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: ./frontend
|
||||||
|
file: ./frontend/Dockerfile
|
||||||
|
push: false
|
||||||
|
tags: siteworxpro/frontend:${{ gitea.ref_name }}
|
||||||
|
- name: Build Container
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: ./frontend
|
||||||
|
file: ./frontend/Dockerfile
|
||||||
|
push: false
|
||||||
|
tags: siteworxpro/frontend:latest
|
||||||
BuildBackend:
|
BuildBackend:
|
||||||
name: Build Backend
|
name: Build Backend
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
12
frontend/Dockerfile
Normal file
12
frontend/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
FROM node:22.14.0 AS BUILD
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
|
||||||
|
RUN npm install && \
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
FROM caddy
|
||||||
|
|
||||||
|
COPY --from=BUILD /app/dist /usr/share/caddy
|
||||||
Reference in New Issue
Block a user