Skip to content

Commit

Permalink
Merge branch 'main' of github.com:facebook/docusaurus into lex111/cod…
Browse files Browse the repository at this point in the history
…e-wrap
  • Loading branch information
lex111 committed Apr 15, 2022
2 parents dab2f96 + 44966e1 commit 6d57368
Show file tree
Hide file tree
Showing 366 changed files with 7,085 additions and 5,548 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build-blog-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ on:
paths:
- packages/docusaurus/**

permissions:
contents: read

jobs:
build:
name: Build Blog-only
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
node-version: '16'
cache: yarn
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/build-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,26 @@ on:
paths-ignore:
- website/docs/**

permissions:
contents: read

jobs:
build-size:
permissions:
checks: write # for preactjs/compressed-size-action to create and update the checks
contents: read # for actions/checkout to fetch code
issues: write # for preactjs/compressed-size-action to create comments
pull-requests: write # for preactjs/compressed-size-action to write a PR review
name: Build Size Report
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
node-version: '16'
cache: yarn
- uses: preactjs/compressed-size-action@v2
- uses: preactjs/compressed-size-action@8119d3d31b6e57b167e09c81dfa877eada3bcb35 # v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
build-script: build:website:en
Expand All @@ -37,8 +45,8 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
cache: yarn
- name: Installation
Expand All @@ -53,4 +61,4 @@ jobs:
- name: Build (warm cache)
run: yarn workspace website build --locale en
timeout-minutes: 2
# TODO post a Github comment with build with perf warnings?
# TODO post a GitHub comment with build with perf warnings?
7 changes: 5 additions & 2 deletions .github/workflows/canary-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ on:
paths:
- packages/**

permissions:
contents: read

jobs:
publish-canary:
name: Publish Canary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
with:
fetch-depth: 0 # Needed to get the commit number with "git rev-list --count HEAD"
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
node-version: '16'
cache: yarn
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@883476649888a9e8e219d5b2e6b789dc024f690c # v1
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@883476649888a9e8e219d5b2e6b789dc024f690c # v1
13 changes: 13 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 #v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@3f943b86c9a289f4e632c632695e2e0898d9d67d # v1
10 changes: 5 additions & 5 deletions .github/workflows/lighthouse-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
name: Lighthouse Report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Wait for the Netlify Preview
uses: jakepartusch/wait-for-netlify-action@v1
uses: jakepartusch/wait-for-netlify-action@7dcdeb40c6bc3710a8099702a1fa1ce2c5e322a6 # v1
id: netlify
with:
site_name: docusaurus-2
max_timeout: 600
- name: Audit URLs using Lighthouse
id: lighthouse_audit
uses: treosh/[email protected]
uses: treosh/lighthouse-ci-action@b4dfae3eb959c5226e2c5c6afd563d493188bfaf # 9.3.0
with:
urls: |
https://deploy-preview-$PR_NUMBER--docusaurus-2.netlify.app/
Expand All @@ -30,7 +30,7 @@ jobs:
PR_NUMBER: ${{ github.event.pull_request.number}}
- name: Format lighthouse score
id: format_lighthouse_score
uses: actions/github-script@v6
uses: actions/github-script@9ac08808f993958e9de277fe43a64532a609130e # v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand All @@ -55,7 +55,7 @@ jobs:
- name: Add Lighthouse stats as comment
id: comment_to_pr
uses: marocchino/[email protected]
uses: marocchino/sticky-pull-request-comment@39c5b5dc7717447d0cba270cd115037d32d28443 # v2.2.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.pull_request.number }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ on:
branches:
- main

permissions:
contents: read

jobs:
lint:
name: Lint
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
node-version: '16'
cache: yarn
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/showcase-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ on:
paths:
- website/src/data/**

permissions:
contents: read

jobs:
validate-config:
name: Validate Showcase Config
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
node-version: '16'
cache: yarn
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
paths-ignore:
- website/**

permissions:
contents: read

jobs:
yarn-v1:
name: E2E — Yarn v1
Expand All @@ -21,9 +24,9 @@ jobs:
matrix:
node: ['14', '16', '17']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
node-version: ${{ matrix.node }}
cache: yarn
Expand Down Expand Up @@ -59,9 +62,9 @@ jobs:
- variant: -st
nodeLinker: pnp
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Use Node.js 16
uses: actions/setup-node@v3
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
node-version: '16'
cache: yarn
Expand Down Expand Up @@ -100,21 +103,21 @@ jobs:
working-directory: ../test-website

npm:
name: E2E — NPM
name: E2E — npm
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 #v3
- name: Use Node.js 16
uses: actions/setup-node@v3
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
node-version: '16'
cache: yarn
- name: Installation
run: yarn
- name: Generate test-website project against main branch
run: yarn test:build:website -s
- name: Install test-website project with NPM
- name: Install test-website project with npm
run: npm install
working-directory: ../test-website
env:
Expand All @@ -129,21 +132,21 @@ jobs:
working-directory: ../test-website

pnpm:
name: E2E — PNPM
name: E2E — pnpm
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 #v3
- name: Use Node.js 16
uses: actions/setup-node@v3
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
node-version: '16'
cache: yarn
- name: Installation
run: yarn
- name: Generate test-website project against main branch
run: yarn test:build:website -s
- name: Install test-website project with PNPM
- name: Install test-website project with pnpm
run: |
curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
pnpm install
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tests-swizzle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
paths:
- packages/**

permissions:
contents: read

jobs:
test:
name: Swizzle
Expand All @@ -17,9 +20,9 @@ jobs:
action: ['eject', 'wrap']
variant: ['js', 'ts']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
node-version: 14
cache: yarn
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
paths-ignore:
- website/**

permissions:
contents: read

jobs:
windows-test:
name: Windows Tests
Expand All @@ -18,9 +21,9 @@ jobs:
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- uses: actions/checkout@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
node-version: ${{ matrix.node }}
- name: Installation
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
paths-ignore:
- website/**

permissions:
contents: read

jobs:
test:
name: Tests
Expand All @@ -16,9 +19,9 @@ jobs:
matrix:
node: ['14', '16', '17']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
with:
node-version: ${{ matrix.node }}
cache: yarn
Expand Down
Loading

0 comments on commit 6d57368

Please sign in to comment.