Skip to content

Create test

Create test #6

Workflow file for this run

name: Node.js CI
on:
push:
branches: ["0.1.x"]
pull_request:
branches: ["0.1.x"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.14] # Adjust the Node.js version as needed
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# Cache npm dependencies and the dist folder
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
node_modules
dist
key: ${{ runner.os }}-node-${{ hashFiles('**/*.lock') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
# Run build script
- run: npm run build --if-present
# 👇 Store the dist folder
- uses: actions/upload-artifact@v3
with:
name: app-build
path: dist
deploy:
runs-on: ubuntu-latest
needs: [build]
steps:
# 👇 Get the dist folder
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: app-build
- run: ls dist