mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-09-08 23:50:48 +02:00
feat: Implement frontend asset build process and update Docker configuration
- Added a new build script using esbuild to bundle JavaScript and CSS assets, including Tailwind CSS and Font Awesome. - Updated the Dockerfile to include a multi-stage build process for frontend assets, ensuring efficient image creation. - Enhanced GitHub workflows to automate the installation of Node.js dependencies and build frontend assets during CI/CD. - Introduced a .gitignore entry for the dist directory to prevent unnecessary files from being tracked. - Improved caching and content type handling for static files served by the application.
This commit is contained in:
@@ -29,6 +29,23 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # Needed to get all tags for versioning
|
||||
|
||||
# Set up Node.js for frontend build
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
# Install dependencies
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
# Build frontend assets
|
||||
- name: Build frontend assets
|
||||
run: |
|
||||
node build.js
|
||||
ls -la static/dist/
|
||||
|
||||
# Set version information
|
||||
- name: Set Version
|
||||
id: version
|
||||
|
||||
@@ -30,6 +30,23 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # Needed to get all tags for versioning
|
||||
|
||||
# Set up Node.js for frontend build
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
# Install dependencies
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
# Build frontend assets
|
||||
- name: Build frontend assets
|
||||
run: |
|
||||
node build.js
|
||||
ls -la static/dist/
|
||||
|
||||
# Set version information
|
||||
- name: Set Version
|
||||
id: version
|
||||
|
||||
@@ -27,6 +27,26 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build frontend assets
|
||||
run: |
|
||||
# Build JavaScript and CSS assets
|
||||
node build.js
|
||||
|
||||
# Ensure the dist directory exists
|
||||
mkdir -p static/dist
|
||||
|
||||
# Verify the build output
|
||||
ls -la static/dist
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user