Skip to content

Merge pull request #247 from VirtualMetric:DT-385-sso-and-multi-tenan… #382

Merge pull request #247 from VirtualMetric:DT-385-sso-and-multi-tenan…

Merge pull request #247 from VirtualMetric:DT-385-sso-and-multi-tenan… #382

Workflow file for this run

name: Deployment Pipeline
on:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
prepare:
name: "Prepare: Bootstrap the repository"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm install
# Cache node modules
- name: Cache Node Modules
uses: actions/cache@v4
with:
path: ./**/node_modules
key: ${{ github.sha }}-node-modules
restore-keys: |
${{ github.sha }}-node-modules
build-docs:
name: Build VirtualMetric Docs
needs: [prepare]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Restore node modules
- name: Restore Node Modules
uses: actions/cache@v4
with:
path: ./**/node_modules
key: ${{ github.sha }}-node-modules
restore-keys: |
${{ github.sha }}-node-modules
- name: Building the dashboard application
run: npm run build
# Cache the build outputs
- name: Cache Main Build
uses: actions/cache@v4
with:
path: ./build
key: ${{ github.sha }}-docs-build-output
restore-keys: |
${{ github.sha }}-docs-build-output
deploy-docs:
name: Deploy VirtualMetric Docs
needs: [build-docs]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Restore build outputs for main app
- name: Restore Main Build
uses: actions/cache@v4
with:
path: ./build
key: ${{ github.sha }}-docs-build-output
restore-keys: |
${{ github.sha }}-docs-build-output
- name: Docs CloudFlare Deployment
id: application-deployment
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy build --project-name virtualmetric-docs --branch=main