Skip to content

Update ci cd tools #7 #32

Update ci cd tools #7

Update ci cd tools #7 #32

Workflow file for this run

name: Casanet lightweight dashboard CI CD
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Bundle www # The assets build for the public CDN
env:
API_URL_PROD: '${{ secrets.API_URL }}'
API_URL_DEV: '${{ secrets.API_URL_DEV }}'
run: |
export ON_BRANCH=${GITHUB_REF##*/}
if [[ $ON_BRANCH == 'main' ]]; then export API_URL=$API_URL_PROD ; else export API_URL=$API_URL_DEV; fi
node scripts/set-environment.js
- uses: actions/upload-artifact@v4
with:
name: www
path: src
- name: Bundle internal # The assets build for the local server, the api server is just ''
env:
API_URL: ''
run: |
node scripts/set-environment.js
- uses: actions/upload-artifact@v4
with:
name: internal
path: src