Skip to content

DTSPO-14815: Adding base files for dashboard #12

DTSPO-14815: Adding base files for dashboard

DTSPO-14815: Adding base files for dashboard #12

Workflow file for this run

name: Deploy
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./dashboard
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Install dependencies
run: npm ci
working-directory: ./dashboard
- name: Build project
run: npm run build
working-directory: ./dashboard
- name: Upload production-ready build files
uses: actions/upload-artifact@v3
with:
name: production-files
path: ./dashboard/dist
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: production-files
path: ./dist
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist