Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 6 additions & 43 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# A descriptive name for your workflow
name: Deploy Vite App to GitHub Pages
name: Deploy API docs to GitHub Pages

on:
push:
Expand All @@ -14,12 +13,9 @@ concurrency:
permissions: {}

jobs:
#--------------------------------------
# Build Job: Prepares the application
#--------------------------------------
build:
permissions:
contents: read # Or another more restrictive permission if possible.
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
Expand All @@ -29,66 +25,33 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 22
# Cache npm dependencies to speed up future builds
cache: 'npm'
cache-dependency-path: |
package-lock.json
browser/package-lock.json
cache-dependency-path: package-lock.json

- name: Install root dependencies
- name: Install dependencies
run: npm ci

- name: Remove browser package-lock.json and node_modules
working-directory: ./browser
run: rm -rf package-lock.json node_modules

- name: Install browser dependencies
# Specifies the working directory for the command
working-directory: ./browser
run: npm install

- name: Build hed-validator package
- name: Build package
run: npm run build

- name: Link hed-validator package
run: npm link

- name: Link dependency for browser build
working-directory: ./browser
run: npm link hed-validator

- name: Build documentation
run: npx typedoc --options typedoc.json --tsconfig tsconfig.json

- name: Build Vite site
working-directory: ./browser
run: npm run build

- name: Upload artifact for deployment
uses: actions/upload-pages-artifact@v5
with:
# Specifies the directory to upload. This should match your build output folder.
path: ./browser/buildweb
path: ./docs/html

#------------------------------------------------
# Deploy Job: Deploys the built site
#------------------------------------------------
deploy:
# This job depends on the 'build' job completing successfully
needs: build
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest

# Specify the deployment environment
environment:
name: github-pages
# The URL will be automatically set by the deployment step's output
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
# This is the official action for deploying the artifact to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
Loading