Skip to content

Commit 82e6c4d

Browse files
committed
Merge branch 'main' into feat/document-mob-goals
# Conflicts: # config/sidebar.paper.ts
2 parents 1c27f8f + f394ff5 commit 82e6c4d

File tree

278 files changed

+28184
-21363
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+28184
-21363
lines changed

.devcontainer/devcontainer.json

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
{
2-
"image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04",
3-
"settings": {
4-
"[typescript]": {
5-
"editor.defaultFormatter": "esbenp.prettier-vscode",
6-
"editor.formatOnSave": true
7-
},
8-
"[typescriptreact]": {
9-
"editor.defaultFormatter": "esbenp.prettier-vscode",
10-
"editor.formatOnSave": true
11-
},
12-
"[markdown]": {
13-
"editor.wordWrap": "on"
14-
}
15-
},
16-
"extensions": [
17-
"esbenp.prettier-vscode"
18-
],
19-
"forwardPorts": [3000],
20-
"postCreateCommand": ["yarn", "install"],
21-
"waitFor": "postCreateCommand",
22-
"features": {
23-
"node": {
24-
"version": "18"
25-
}
26-
}
2+
"image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04",
3+
"settings": {
4+
"[typescript]": {
5+
"editor.defaultFormatter": "esbenp.prettier-vscode",
6+
"editor.formatOnSave": true
7+
},
8+
"[typescriptreact]": {
9+
"editor.defaultFormatter": "esbenp.prettier-vscode",
10+
"editor.formatOnSave": true
11+
},
12+
"[markdown]": {
13+
"editor.wordWrap": "on"
14+
}
15+
},
16+
"extensions": ["esbenp.prettier-vscode"],
17+
"forwardPorts": [3000],
18+
"postCreateCommand": ["pnpm", "install"],
19+
"waitFor": "postCreateCommand",
20+
"features": {
21+
"node": {
22+
"version": "20"
23+
}
24+
}
2725
}

.editorconfig

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
root = true
22

33
[*]
4-
insert_final_newline = true
54
charset = utf-8
65
end_of_line = lf
76
indent_style = space
8-
9-
[*.{ts,md,mdx,css,json,yml}]
107
indent_size = 2
11-
tab_width = 2
12-
13-
[*.{ts,mdx,css,json,yml}]
8+
max_line_length = 100
9+
insert_final_newline = true
1410
trim_trailing_whitespace = true
1511

16-
[*.md]
17-
trim_trailing_whitespace = false
18-
12+
[{*.md,*.mdx}]
13+
indent_size = 4
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Build Preview Deployment"
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
jobs:
8+
build-preview:
9+
runs-on: "ubuntu-latest"
10+
name: "Build Preview Site and Upload Build Artifact"
11+
steps:
12+
- name: "checkout"
13+
uses: "actions/checkout@v4"
14+
with:
15+
fetch-depth: 0
16+
ref: ${{ github.event.pull_request.head.ref }}
17+
repository: ${{ github.event.pull_request.head.repo.full_name }}
18+
- name: "setup pnpm"
19+
uses: "pnpm/action-setup@v4"
20+
- name: "setup node"
21+
uses: "actions/setup-node@v4"
22+
with:
23+
cache: "pnpm"
24+
node-version: 20
25+
- name: "install dependencies"
26+
run: "pnpm install"
27+
- name: "build"
28+
run: "pnpm run build"
29+
env:
30+
CI_ENV: preview
31+
GITHUB_PR_HEAD_OWNER: ${{ github.event.pull_request.head.repo.owner.login }}
32+
- name: "copy cloudflare configuration files to build directory"
33+
run: |
34+
cp _headers build/
35+
cp _redirects build/
36+
- name: "upload build artifact"
37+
uses: "actions/upload-artifact@v4"
38+
with:
39+
name: "preview-build"
40+
path: "build"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "Publish Preview Deployment"
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Build Preview Deployment"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
actions: read
11+
contents: read
12+
deployments: write
13+
pull-requests: write
14+
15+
jobs:
16+
deploy-preview:
17+
runs-on: "ubuntu-latest"
18+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
19+
name: "Deploy Preview to Cloudflare Pages"
20+
steps:
21+
- name: "Download build artifact"
22+
uses: "actions/download-artifact@v4"
23+
id: "preview-build-artifact"
24+
with:
25+
name: "preview-build"
26+
path: "build"
27+
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
run-id: ${{ github.event.workflow_run.id }}
29+
- name: "Deploy to Cloudflare Pages"
30+
uses: "AdrianGonz97/refined-cf-pages-action@v1"
31+
with:
32+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
33+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
34+
githubToken: ${{ secrets.GITHUB_TOKEN }}
35+
projectName: "papermc-docs"
36+
deploymentName: "Preview"
37+
directory: ${{ steps.preview-build-artifact.outputs.download-path }}

.github/workflows/deploy.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Deploy to Cloudflare Pages (Production)"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: "ubuntu-latest"
11+
permissions:
12+
contents: read
13+
deployments: write
14+
pull-requests: write
15+
steps:
16+
- name: "checkout"
17+
uses: "actions/checkout@v4"
18+
with:
19+
fetch-depth: 0
20+
- name: "setup pnpm"
21+
uses: "pnpm/action-setup@v4"
22+
- name: "setup node"
23+
uses: "actions/setup-node@v4"
24+
with:
25+
cache: "pnpm"
26+
node-version: 20
27+
- name: "install dependencies"
28+
run: "pnpm install"
29+
- name: "build"
30+
run: "pnpm run build"
31+
env:
32+
CI_ENV: production
33+
- name: "copy cloudflare configuration files to build directory"
34+
run: |
35+
cp _headers build/
36+
cp _redirects build/
37+
- name: "publish (push)"
38+
id: "cloudflare-publish"
39+
uses: "AdrianGonz97/refined-cf-pages-action@v1"
40+
with:
41+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
42+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
43+
projectName: "papermc-docs"
44+
deploymentName: "Production"
45+
directory: "build"
46+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/format.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Format check"
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
format:
9+
# run on all push events or on PR syncs not from the same repo
10+
if: github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name
11+
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4
18+
- name: Set up Node
19+
uses: actions/setup-node@v4
20+
with:
21+
cache: "pnpm"
22+
node-version: 20
23+
- name: Install dependencies
24+
run: pnpm install
25+
- name: Check format
26+
run: pnpm run format:check

.github/workflows/spellcheck.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Spell check"
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
check:
9+
# run on all push events or on PR syncs not from the same repo
10+
if: github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name
11+
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
- name: Spell check
17+
uses: crate-ci/[email protected]

.gitignore

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,5 @@
66
.cache-loader
77
.DS_Store
88
npm-debug.log*
9-
yarn-debug.log*
10-
yarn-error.log*
119
.pnp.*
12-
.yarn/*
13-
!.yarn/patches
14-
!.yarn/plugins
15-
!.yarn/releases
16-
!.yarn/sdks
17-
!.yarn/versions
1810
/.meta

.prettierignore

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
/.docusaurus
2-
/.vscode
3-
/.yarn
4-
/build
5-
/node_modules
6-
/.pnp*
7-
/*.js
8-
/*.js.map
9-
/config/*.js
10-
/.meta
1+
pnpm-lock.yaml
2+
docs/versioned
3+
*.md
4+
*.mdx
5+
!README.md
6+
!CONTRIBUTING.md

.prettierrc.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
2-
"printWidth": 100,
3-
"proseWrap": "always",
4-
"overrides": [
5-
{
6-
"files": "*.md",
7-
"options": {
8-
"parser": "mdx"
9-
}
10-
}
11-
]
2+
"arrowParens": "always",
3+
"singleQuote": false,
4+
"semi": true,
5+
"trailingComma": "es5"
126
}

0 commit comments

Comments
 (0)