diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..5e34996 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,38 @@ +name: Node.js CI + +on: + + push: + paths: + - 'app/dashboard/**' + # branches: [ "master" ] + pull_request: + paths: + - 'app/dashboard/**' + # branches: [ "master" ] + +jobs: + build: + env: + VITE_BASE_API: /api/ + runs-on: ubuntu-latest + defaults: + run: + working-directory: 'app/dashboard' + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '21.0' + cache: 'npm' + - run: npm ci + - run: npm run build --if-present -- --outDir build --base '/dashboard/' + - run: npm test + + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4.2.0 + with: + name: artifact + path: app/dashboard/build