Skip to content

Commit

Permalink
Create parallel builds for the v2 site.
Browse files Browse the repository at this point in the history
When it is hosted in production, the website is at `effection/v2`,
but when we're doing local development, the website is at
`v2/`.

Unfortunately, there is no way to control the docusaurus build
at runtime, so this creates two builds, one that works at both paths.
  • Loading branch information
cowboyd committed Oct 3, 2023
1 parent 2152869 commit 8b8ef07
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/v2-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ jobs:
- run: |
cd website
yarn install
yarn build
tar czvf ${{ github.ref_name }}.website.tgz -C public effection
cp *.website.tgz ..
yarn docusaurus build --config ./docusaurus.config.local.js --out-dir build/local
tar czvf ${{ github.ref_name }}.website.local.tgz -C build/local .
yarn docusaurus build --config ./docusaurus.config.prod.js --out-dir build/prod
tar czvf ${{ github.ref_name }}.website.prod.tgz -C build/prod .
cp *.tgz ..
- run: node -pe '`relnum=${"${{ github.ref_name }}".substring("docs-v2-r".length)}`' >> $GITHUB_OUTPUT
id: relnum
Expand Down
6 changes: 6 additions & 0 deletions website/docusaurus.config.local.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const base = require('./docusaurus.config');

module.exports = {
...base,
baseUrl: 'v2/',
}
6 changes: 6 additions & 0 deletions website/docusaurus.config.prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const base = require('./docusaurus.config');

module.exports = {
...base,
baseUrl: 'effection/v2/',
}

1 comment on commit 8b8ef07

@deno-deploy
Copy link

@deno-deploy deno-deploy bot commented on 8b8ef07 Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed to deploy:

Module not found "file:///src/www/main.ts".

Please sign in to comment.