Skip to content

Update data.ts -- fixed formatting issue #37

Update data.ts -- fixed formatting issue

Update data.ts -- fixed formatting issue #37

Workflow file for this run

name: Deploy UI to GitHub Pages
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: 'ui/package-lock.json'
- name: Install dependencies
run: npm ci
working-directory: ./ui
- name: Setup environment
run: |
# Create .env.local in the ui directory
cd ui
if [ ! -f .env.local ]; then
echo "DATA_PATH=../data/sheets/output_kg.jsonl" > .env.local
fi
- name: Copy data for static build
run: |
mkdir -p public
cp ../data/sheets/output_kg.jsonl public/data.jsonl
working-directory: ./ui
- name: Build with Next.js
run: npm run build
working-directory: ./ui
env:
NODE_ENV: production
- name: List build output
run: |
echo "Build output contents:"
ls -la out/
echo "Static files:"
find out/ -name "*.html" -o -name "*.css" -o -name "*.js" | head -10
working-directory: ./ui
- name: Copy data to build output
run: |
# Copy the data file to the build output directory
cp public/data.jsonl out/data.jsonl
echo "Data file copied to build output:"
ls -la out/data.jsonl
working-directory: ./ui
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload the 'out' directory from the ui folder
path: './ui/out'
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4