changing the way that pipelines work
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
node_modules
|
||||
dist
|
||||
.git
|
||||
.env
|
||||
.DS_Store
|
||||
|
||||
@@ -22,8 +22,15 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install JS dependencies
|
||||
run: npm install
|
||||
- name: Run prepare scripts
|
||||
run: sh scripts/prepare_release.sh
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
|
||||
build_vision_start:
|
||||
name: Build Vision Start Image
|
||||
@@ -33,6 +40,12 @@ jobs:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
|
||||
- name: Log in to Container Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" \
|
||||
|
||||
@@ -23,16 +23,21 @@ jobs:
|
||||
run: sudo apt-get install zip jq curl -y
|
||||
- name: Install JS dependencies
|
||||
run: npm install
|
||||
- name: Prepare release
|
||||
run: bash scripts/prepare_release.sh
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
- name: Prepare release
|
||||
- name: Upload dist artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
- name: Package release zip
|
||||
run: |
|
||||
bash scripts/prepare_release.sh
|
||||
mv dist vision-start/
|
||||
mv manifest.json vision-start/
|
||||
- name: Create zip archive
|
||||
run: zip -r vision-start-${{ gitea.ref_name }}.zip vision-start
|
||||
- name: Upload artifact
|
||||
cp -r dist vision-start/
|
||||
cp manifest.json vision-start/
|
||||
zip -r vision-start-${{ gitea.ref_name }}.zip vision-start
|
||||
- name: Upload release zip artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: release-zip
|
||||
@@ -103,6 +108,12 @@ jobs:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Download dist artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
|
||||
- name: Log in to Container Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" \
|
||||
|
||||
25
Dockerfile
25
Dockerfile
@@ -1,28 +1,7 @@
|
||||
FROM node:22-alpine AS builder
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json (if available)
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Copy the rest of the application
|
||||
COPY . .
|
||||
|
||||
# Run prepare scripts to fetch required assets
|
||||
RUN sh scripts/prepare_release.sh
|
||||
|
||||
# Build the application
|
||||
RUN npm run build
|
||||
|
||||
# Production stage
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy the built application from the builder stage
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
# Copy the pre-built application
|
||||
COPY dist/ /usr/share/nginx/html/
|
||||
|
||||
# Copy the manifest.json
|
||||
COPY manifest.json /usr/share/nginx/html/
|
||||
|
||||
Reference in New Issue
Block a user