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