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

Migrate away from Vercel #415

Merged
merged 10 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/deploy-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
run: "pnpm install"
- name: "build"
run: "pnpm run build"
- name: "copy cloudflare configuration files to build directory"
run: |
cp _headers build/
cp _redirects build/
- name: "publish (push)"
id: "cloudflare-publish"
uses: "cloudflare/pages-action@v1"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
run: "pnpm install"
- name: "build"
run: "pnpm run build"
- name: "copy cloudflare configuration files to build directory"
run: |
cp _headers build/
cp _redirects build/
- name: "publish (push)"
id: "cloudflare-publish"
uses: "cloudflare/pages-action@v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
node-version: 20
- name: Install dependencies
run: pnpm install
- name: Check format
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ If you wish to contribute to the PaperMC Docs, please follow these steps:
4. Commit your changes and push them to your fork.

5. Submit a pull request (PR) to the `main` branch of the Docs repository.
Vercel will automatically deploy a preview of your changes to the PR. The link to the preview will be available in a PR comment.
Cloudflare Pages will automatically deploy a preview of your changes to the PR. The link to the preview will be available in a PR comment.

6. Your PR will be reviewed, and feedback may be provided if necessary.

Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# docs [![Discord](https://img.shields.io/discord/289587909051416579.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/papermc) ![Deployment Status](https://img.shields.io/github/deployments/PaperMC/docs/production?label=deployment&logo=github) ![License](https://img.shields.io/github/license/PaperMC/docs)

[vercel]: https://vercel.com?utm_source=papermc&utm_campaign=oss

This is the repository for all project documentation under the PaperMC umbrella. Content in this
repository is published to [docs.papermc.io](https://docs.papermc.io) for viewing.

Expand Down Expand Up @@ -57,8 +55,3 @@ The supporting code is

The PaperMC logomark is subject to its [own terms](https://docs.papermc.io/misc/assets) and does not
inherit a license from any of the projects it represents.

## Special Thanks

Preview and production hosting for this project has been provided for free by [Vercel]. Thank you!
[![Vercel](static/img/powered-by-vercel.svg)][vercel]
2 changes: 2 additions & 0 deletions _headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/assets/(.*)
cache-control: public, immutable, max-age=31536000
9 changes: 9 additions & 0 deletions _redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/intro /
/java-install-update /misc/java-install
/papermc/* /misc/*
/velocity/developers/* /velocity/dev/*
/paper/reference/paper-per-world-configuration /paper/reference/world-configuration
/paper/reference/paper-global-configuration /paper/reference/global-configuration
/paper/per-world-configuration /paper/configuration
/paper/configuration /paper/reference/configuration
/paper/reference/vanilla-command-permissions /paper/reference/permissions
2 changes: 1 addition & 1 deletion config/footer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const footer: Footer = {
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} PaperMC and Contributors. Built with Docusaurus.<a href="https://vercel.com/?utm_source=papermc&utm_campaign=oss" style="text-decoration:underline;color:inherit;margin-top:10px;"><img src="/img/powered-by-vercel.svg" alt="vercel"/></a>`,
copyright: `Copyright © ${new Date().getFullYear()} PaperMC and Contributors. Built with Docusaurus.`,
};

export default footer;
5 changes: 2 additions & 3 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import {
getFileCommitHashSafe,
} from "./src/util/authorUtils";

const preview = env.VERCEL_ENV === "preview";
const preview = env.CF_PAGES_BRANCH !== "main";
cacheAuthorData(preview || process.env.NODE_ENV === "development");

const url = (preview && `https://${env.VERCEL_URL}`) || "https://docs.papermc.io";
const url = (preview && `https://${env.CF_PAGES_URL}`) || "https://docs.papermc.io";

const docsCommon: Options = {
breadcrumbs: true,
Expand Down Expand Up @@ -222,7 +222,6 @@ const config: Config = {
},
],
"@docusaurus/plugin-debug",
"@docusaurus/plugin-vercel-analytics",
"docusaurus-plugin-sass",
],

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"@docusaurus/plugin-debug": "3.4.0",
"@docusaurus/plugin-pwa": "3.4.0",
"@docusaurus/plugin-sitemap": "3.4.0",
"@docusaurus/plugin-vercel-analytics": "3.4.0",
"@docusaurus/theme-classic": "3.4.0",
"@docusaurus/theme-common": "3.4.0",
"@docusaurus/theme-mermaid": "3.4.0",
Expand Down
62 changes: 0 additions & 62 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions static/img/powered-by-vercel.svg

This file was deleted.

59 changes: 0 additions & 59 deletions vercel.json

This file was deleted.

Loading