-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cloudflare): dedicated package for building and deploying to clo…
…udflare (#45)
- Loading branch information
1 parent
649369c
commit 88b68c6
Showing
11 changed files
with
76 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: CI - Deploy Cloudflare | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ci-deploy-cloudflare: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: packages/deploy-cloudflare | ||
|
||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
corepack: true | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm i | ||
working-directory: ./ | ||
|
||
- name: Build the app | ||
run: pnpm build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
dist | ||
dist-app | ||
dist-node | ||
dist-cloudflare | ||
|
||
# Node dependencies | ||
node_modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Build the app server and client | ||
pnpm --filter @enclosed/app-server build:cloudflare | ||
pnpm --filter @enclosed/app-client build | ||
|
||
# Reset the dist folder | ||
rm -rf dist | ||
mkdir dist | ||
|
||
# Copy the app server and client to the dist folder | ||
cp -r ../app-server/dist-cloudflare/* dist/ | ||
cp -r ../app-client/dist/* dist/ | ||
|
||
# Copy routes.json to the dist folder | ||
cp _routes.json dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "@enclosed/deploy-cloudflare", | ||
"version": "0.0.0", | ||
"description": "Deploy scripts for Cloudflare Pages", | ||
"packageManager": "pnpm@9.8.0", | ||
"license": "Apache-2.0", | ||
"author": "Corentin Thomasset <corentinth@proton.me> (https://corentin.tech)", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/CorentinTh/enclosed" | ||
}, | ||
"scripts": { | ||
"build": "./build.sh" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../app-server/wrangler.toml |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.