Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs workflow working-directory #321

Merged
merged 1 commit into from
Jul 11, 2024
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
21 changes: 14 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
# Reference: https://vitepress.dev/guide/deploy#github-pages

name: Deploy VitePress site to Pages
name: Publish Docs

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
Expand All @@ -24,11 +24,6 @@ concurrency:
group: pages
cancel-in-progress: false

defaults:
run:
# All jobs in this workflow run from the docs directory
working-directory: docs

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -37,6 +32,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -48,20 +44,31 @@ jobs:
dotnet-version: 8.0.x
- name: Setup Pages
uses: actions/configure-pages@v4

- name: Install npm packages
working-directory: ./docs
run: npm ci

- name: Build JS API docs
working-directory: ./docs
run: npm run build-js

- name: Build .NET API docs
working-directory: ./docs
run: npm run build-dotnet

- name: Render docs with VitePress
working-directory: ./docs
run: npm run build

- name: Copy images
working-directory: ./docs
run: cp -r images .vitepress/dist/images

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: .vitepress/dist
path: ./docs/.vitepress/dist

deploy:
environment:
Expand Down
Loading