Skip to content

Commit b5ae2e3

Browse files
Migrate away from Vercel (#106)
* migrate away from Vercel * stupid lock file
1 parent 9e95fae commit b5ae2e3

File tree

4 files changed

+3704
-3297
lines changed

4 files changed

+3704
-3297
lines changed

.github/workflows/deploy-pr.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Deploy to Cloudflare Pages (Preview)"
2+
3+
on: [pull_request_target]
4+
5+
jobs:
6+
deploy:
7+
runs-on: "ubuntu-latest"
8+
permissions:
9+
contents: read
10+
deployments: write
11+
pull-requests: write
12+
steps:
13+
- name: "checkout"
14+
uses: "actions/checkout@v4"
15+
with:
16+
fetch-depth: 0
17+
ref: ${{ github.event.pull_request.head.ref }}
18+
repository: ${{ github.event.pull_request.head.repo.full_name }}
19+
- name: "setup pnpm"
20+
uses: "pnpm/action-setup@v4"
21+
- name: "setup node"
22+
uses: "actions/setup-node@v4"
23+
with:
24+
cache: "pnpm"
25+
node-version: 20
26+
- name: "install dependencies"
27+
run: "pnpm install"
28+
- name: "build"
29+
run: "pnpm run build"
30+
- name: "publish (push)"
31+
id: "cloudflare-publish"
32+
uses: "AdrianGonz97/refined-cf-pages-action@v1"
33+
with:
34+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
35+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
36+
projectName: "papermc-website"
37+
deploymentName: "Preview"
38+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
39+
directory: "build"

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ yarn-error.log*
2828
# local env files
2929
.env*.local
3030

31-
# vercel
32-
.vercel
33-
3431
# typescript
3532
*.tsbuildinfo
3633

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@
4141
"windicss": "3.5.6",
4242
"windicss-webpack-plugin": "1.8.0"
4343
},
44-
"sideEffects": false
44+
"sideEffects": false,
45+
"packageManager": "[email protected]+sha512.98a80fd11c2e7096747762304106432b3ddc67dcf54b5a8c01c93f68a2cd5e05e6821849522a06fb76284d41a2660d5e334f2ee3bbf29183bf2e739b1dafa771"
4546
}

0 commit comments

Comments
 (0)