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

ci(v2): test swizzle on CI using v2 website #3840

Closed
wants to merge 12 commits into from
58 changes: 58 additions & 0 deletions .github/workflows/swizzle-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Swizzle Test

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['12']
steps:
- uses: actions/checkout@v1
Simek marked this conversation as resolved.
Show resolved Hide resolved
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
Simek marked this conversation as resolved.
Show resolved Hide resolved
with:
node-version: ${{ matrix.node }}
- name: Installation
run: yarn
- name: Swizzle most of `theme-classic` components
run: |
yarn swizzle:v2 AnnouncementBar --danger
yarn swizzle:v2 BlogListPage --danger
yarn swizzle:v2 BlogListPaginator --danger
yarn swizzle:v2 BlogPostItem --danger
yarn swizzle:v2 BlogPostPage --danger
yarn swizzle:v2 BlogPostPaginator --danger
yarn swizzle:v2 BlogSidebar --danger
yarn swizzle:v2 BlogTagsListPage --danger
yarn swizzle:v2 BlogTagsPostsPage --danger
yarn swizzle:v2 DocItem --danger
yarn swizzle:v2 DocPage --danger
yarn swizzle:v2 DocPaginator --danger
yarn swizzle:v2 DocSidebar
yarn swizzle:v2 DocVersionSuggestions --danger
yarn swizzle:v2 Footer
yarn swizzle:v2 Heading --danger
yarn swizzle:v2 Navbar --danger
yarn swizzle:v2 NavbarItem --danger
yarn swizzle:v2 NotFound
yarn swizzle:v2 TabItem --danger
yarn swizzle:v2 Tabs --danger
yarn swizzle:v2 TOC --danger
yarn swizzle:v2 Toggle --danger
yarn swizzle:v2 hooks/useTheme
yarn swizzle:v2 prism-include-languages
- name: Swizzle most of `theme-search-algolia` components
run: |
yarn swizzle:v2:algolia SearchBar
yarn swizzle:v2:algolia SearchPage
- name: Swizzle most of `theme-live-codeblock` components
run: |
yarn swizzle:v2:codeblock CodeBlock
yarn swizzle:v2:codeblock Playground
- name: Build with swizzled components
run: yarn build:v2:en
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
"serve:v2:ssl:gencert": "openssl req -x509 -nodes -days 365 -newkey rsa:4096 -subj \"/C=US/ST=Docusaurus/L=Anywhere/O=Dis/CN=localhost\" -keyout ./website/.docusaurus/selfsigned.key -out ./website/.docusaurus/selfsigned.crt",
"serve:v2:ssl:message": "echo '\n\n\nServing Docusaurus with HTTPS on localhost requires to disable the Chrome security: chrome://flags/#allow-insecure-localhost\n\n\n'",
"serve:v2:ssl:serve": "serve website/build --ssl-cert ./website/.docusaurus/selfsigned.crt --ssl-key ./website/.docusaurus/selfsigned.key",
"swizzle:v2": "yarn workspace docusaurus-2-website swizzle @docusaurus/theme-classic",
"swizzle:v2:algolia": "yarn workspace docusaurus-2-website swizzle @docusaurus/theme-search-algolia",
"swizzle:v2:codeblock": "yarn workspace docusaurus-2-website swizzle @docusaurus/theme-live-codeblock",
"crowdin:upload:v2": "crowdin upload sources --config ./crowdin-v2.yaml",
"crowdin:uploadTranslations:v2": "crowdin upload translations --config ./crowdin-v2.yaml",
"crowdin:download:v2": "crowdin download --config ./crowdin-v2.yaml",
Expand Down