This commit is contained in:
40
.github/workflows/Build.yml
vendored
Normal file
40
.github/workflows/Build.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: Build and Save Artifact
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Checkout the repository
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Set up Node.js environment
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
# Install dependencies
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
# Build the project
|
||||
- name: Run npm build
|
||||
run: npm run build
|
||||
|
||||
# Upload the build directory as an artifact
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-artifact
|
||||
path: ./dist # Adjust this path to your actual build output directory (e.g., dist/ or similar)
|
||||
Reference in New Issue
Block a user