Skip to content

Commit

Permalink
Automatic deployment of the viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
mandel committed Sep 27, 2024
1 parent 16a8c20 commit 2d8d851
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/mkdocs-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@ jobs:
working-directory: ./pdl-live
steps:
- uses: actions/checkout@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm install
- name: Generate pdl_ast.d.ts
run: npx json2ts ../pdl-schema.json src/pdl_ast.d.ts --unreachableDefinitions
- name: Build viewer
run: npm run build
- name: Copy viewer
run: cp ./dist/bundle.js ../docs/dist/bundle.js

# Build docs
build:
Expand All @@ -55,6 +43,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
# Docs
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Setup Python
Expand All @@ -67,6 +56,20 @@ jobs:
run: mkdocs build --config-file ./mkdocs.yml --strict --site-dir ./_site
env:
CI: true
# Viewer
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm install
- name: Generate pdl_ast.d.ts
run: npx json2ts ../pdl-schema.json src/pdl_ast.d.ts --unreachableDefinitions
- name: Build viewer
run: npm run build
- name: Copy viewer
run: cp ./dist/bundle.js ../docs/dist/bundle.js
# Deploy
- name: Upload artifact
uses: actions/upload-pages-artifact@v3

Expand Down

0 comments on commit 2d8d851

Please sign in to comment.