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 doc generation build dependencies #91

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
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
30 changes: 15 additions & 15 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@ on:
- main

jobs:
build:
deploy:
runs-on: ubuntu-latest
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
cache: 'npm'
- uses: seanmiddleditch/gha-setup-ninja@master
- run: cd configure && npm ci
- run: npm run configure
- run: ninja
- run: ninja -k 0 prep-for-docs
- run: npm run docs
- uses: actions/upload-pages-artifact@v3
with:
path: "./docs"
deploy:
runs-on: ubuntu-latest
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 6 additions & 0 deletions configure/configure.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ format({ in: "configure/configure.mjs" });

const baseConfig = format({ in: "tsconfig.json" });

const docsDependencies = [];

const scope = "@ninjutsu-build/";
for (const cwd of workspaceJSON.workspaces) {
const localPKGJSON = JSON.parse(
Expand Down Expand Up @@ -320,6 +322,8 @@ for (const cwd of workspaceJSON.workspaces) {
in: [packageJSON, ...typeDeclarations].map(getOrderOnlyDeps),
});

docsDependencies.push(packageHasTypes);

// Type check all the tests
const testTargets = await (async () => {
if (!existsSync(join(cwd, "tsconfig.tests.json"))) {
Expand Down Expand Up @@ -393,4 +397,6 @@ for (const cwd of workspaceJSON.workspaces) {
});
}

phony({ out: "prep-for-docs", in: docsDependencies });

writeFileSync("build.ninja", ninja.output);