Skip to content

Update context-stack for command audit cleanup #102

Update context-stack for command audit cleanup

Update context-stack for command audit cleanup #102

name: Deploy Log Viewer to GitHub Pages
on:
push:
branches: [main, master]
paths:
- 'crates/**'
- 'tools/log-viewer/**'
- 'tools/viewer/log-viewer/frontend/viewer-api-frontend/**'
- '.github/workflows/log-viewer-pages.yml'
workflow_dispatch:
inputs:
ref:
description: 'Branch, tag, or commit SHA to deploy (defaults to the branch selected above)'
required: false
default: ''
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Cache Cargo artifacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-demo-logs-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-demo-logs-
- name: Generate demo logs from tests
run: bash tools/log-viewer/scripts/generate-demo-logs.sh
- name: Install shared viewer-api frontend dependencies
working-directory: tools/viewer/log-viewer/frontend/viewer-api-frontend
run: npm install
- name: Install log-viewer frontend dependencies
working-directory: tools/log-viewer/frontend
run: npm install
- name: Build frontend (static mode)
working-directory: tools/log-viewer/frontend
env:
VITE_STATIC_MODE: "true"
VITE_BASE_URL: /${{ github.event.repository.name }}/
VITE_GITHUB_REPO: ${{ github.repository }}
VITE_GITHUB_SHA: ${{ github.sha }}
run: npx vite build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: tools/log-viewer/frontend/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4