mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 19:03:38 +02:00
chore: simplify CI setup (#4447)
* improve ci * improve ci * use actions/setup-node@v2 everywhere * run pwd for test * debug gh action * debug glob CI issue? * Separate v1/v2 tests due to shell conflict * cleanup * test v1 change * circleci fix * fix test docusaurus v1 paths * Refactor CI script names and use paths to filter actions from running unnecessary * fix lighthouse url * v1 tests runInBand * try to fix v1 tests race conditions * change rootDir for v1 tests * minor CI improvements
This commit is contained in:
parent
1135d19333
commit
3422f80a9a
26 changed files with 243 additions and 187 deletions
|
@ -11,25 +11,5 @@
|
|||
# permits to test that baseUrl works fine (this often breaks!)
|
||||
[context.deploy-preview]
|
||||
command = "yarn workspace docusaurus-2-website netlify:build:deployPreview"
|
||||
publish = "website/netlifyDeployPreview"
|
||||
|
||||
# TODO this does not seem to work
|
||||
# workaroud: a _redirect file is created in npm/yarn scripts
|
||||
# can't we have context-based redirects with Netlify? :'(
|
||||
|
||||
[[context.deploy-preview.redirects]]
|
||||
from = "/classic/*"
|
||||
to = "/classic/404.html"
|
||||
status = 200
|
||||
[[context.deploy-preview.redirects]]
|
||||
from = "/bootstrap/*"
|
||||
to = "/bootstrap/404.html"
|
||||
status = 200
|
||||
[[context.deploy-preview.redirects]]
|
||||
from = "/blog-only/*"
|
||||
to = "/blog-only/404.html"
|
||||
status = 200
|
||||
[[context.deploy-preview.redirects]]
|
||||
from = "/*"
|
||||
to = "/classic/"
|
||||
publish = "website/build"
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
/classic/* /classic/404.html 200
|
||||
/bootstrap/* /bootstrap/404.html 200
|
||||
/blog-only/* /blog-only/404.html 200
|
||||
/v1/* /v1/404.html 200
|
||||
/v1-migrated/* /v1-migrated/404.html 200
|
||||
/* /classic/
|
|
@ -1,44 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<body style="padding: 20px;">
|
||||
<img src="https://v2.docusaurus.io/img/docusaurus.png" />
|
||||
<h1 style="margin-top: 20px;">
|
||||
Docusaurus deploy previews
|
||||
</h1>
|
||||
<section style="margin-top: 40px;">
|
||||
<p>
|
||||
We deploy the Docusaurus site with various configurations. It helps us
|
||||
find potential regressions.
|
||||
</p>
|
||||
<p>When in doubt, try the <a href="/classic">classic preview</a></p>
|
||||
</section>
|
||||
<section style="margin-top: 40px;">
|
||||
<h2>V2 deploy previews:</h2>
|
||||
<ul style="margin-top: 20px;">
|
||||
<li style="margin-top: 20px;">
|
||||
<a href="/classic">classic</a>: the regular Docusaurus v2 site
|
||||
</li>
|
||||
<li style="margin-top: 20px;">
|
||||
<a href="/bootstrap">bootstrap</a>: the regular site with the
|
||||
bootstrap theme (WIP / disabled)
|
||||
</li>
|
||||
<li style="margin-top: 20px;">
|
||||
<a href="/blog-only">blog-only</a>: the regular site in blog-only mode
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section style="margin-top: 40px;">
|
||||
<h2>V1 deploy previews:</h2>
|
||||
<ul style="margin-top: 20px;">
|
||||
<li style="margin-top: 20px;">
|
||||
<a href="/v1">v1</a>: the legacy Docusaurus v1 site
|
||||
</li>
|
||||
<li style="margin-top: 20px;">
|
||||
<a href="/v1-migrated">v1-migrated</a>: the legacy Docusaurus v1 site,
|
||||
migrated to v2 with the migration cli
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
|
@ -19,11 +19,7 @@
|
|||
"start:blogOnly": "cross-env yarn start --config=docusaurus.config-blog-only.js",
|
||||
"build:blogOnly": "cross-env yarn build --config=docusaurus.config-blog-only.js",
|
||||
"netlify:build:production": "yarn docusaurus write-translations && yarn netlify:crowdin:uploadSources && yarn netlify:crowdin:downloadTranslations && yarn build",
|
||||
"netlify:build:deployPreview": "yarn docusaurus write-translations --locale fr --messagePrefix '(fr) ' && yarn netlify:build:deployPreview:v1:all && yarn netlify:build:deployPreview:classic && yarn netlify:build:deployPreview:bootstrap && yarn netlify:build:deployPreview:blogOnly",
|
||||
"netlify:build:deployPreview:classic": "cross-env BASE_URL='/classic/' yarn build --out-dir netlifyDeployPreview/classic",
|
||||
"netlify:build:deployPreview:bootstrap": "echo 'netlify:build:deployPreview:bootstrap temporarily disabled' || cross-env BASE_URL='/bootstrap/' DOCUSAURUS_PRESET=bootstrap DISABLE_VERSIONING=true yarn build --out-dir netlifyDeployPreview/bootstrap",
|
||||
"netlify:build:deployPreview:blogOnly": "yarn build:blogOnly --out-dir netlifyDeployPreview/blog-only",
|
||||
"netlify:build:deployPreview:v1:all": "yarn --cwd .. netlify:deployPreview:v1 && yarn --cwd .. netlify:deployPreview:v1-migrated",
|
||||
"netlify:build:deployPreview": "yarn docusaurus write-translations --locale fr --messagePrefix '(fr) ' && yarn build",
|
||||
"netlify:crowdin:downloadTranslations": "yarn --cwd .. crowdin:download:v2",
|
||||
"netlify:crowdin:downloadTranslationsFailSafe": "yarn --cwd .. crowdin:download:v2 || echo 'Crowdin translation download failure (only internal PRs have access to the Crowdin env token)'",
|
||||
"netlify:crowdin:uploadSources": "yarn --cwd .. crowdin:upload:v2",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue