-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2774b79
commit 2bce5e6
Showing
14 changed files
with
143 additions
and
122 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
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,66 @@ | ||
name: cloudflare | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: contains(github.event.head_commit.message, '[skip ci]') == false | ||
|
||
steps: | ||
- name: 📥 Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: 📸 Calculate commit hash | ||
id: sha | ||
uses: pr-mpt/actions-commit-hash@v2 | ||
|
||
- name: 🔨 Prepare Node environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
- name: 🔨 Prepare Bun environment | ||
uses: oven-sh/setup-bun@v2 | ||
with: | ||
bun-version: latest | ||
|
||
- run: curl -sfS https://dotenvx.sh/install.sh | sh | ||
|
||
- name: 🎉 Install project dependencies | ||
run: bun i | ||
|
||
- name: 🏗️ Build app | ||
run: bun run build | ||
env: | ||
DOTENV_PRIVATE_KEY: ${{ secrets.DOTENV_PRIVATE_KEY }} | ||
DOTENV_PRIVATE_KEY_PRODUCTION: ${{ secrets.DOTENV_PRIVATE_KEY_PRODUCTION }} | ||
|
||
- name: 🚀 Deploy to Cloudflare Pages | ||
id: cloudflare_pages_deploy | ||
uses: cloudflare/[email protected] | ||
with: | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
command: "pages deploy . --project-name wkb" | ||
workingDirectory: ./dist | ||
env: | ||
NODE_VERSION: 22 | ||
|
||
- name: 🚀 Deploy pages based on commit sha | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const sha = context.payload.pull_request?.head.sha ?? context.sha; | ||
await github.rest.repos.createCommitStatus({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
context: "cloudflare / build (push)", | ||
description: "Commit based deploy", | ||
state: "success", | ||
sha, | ||
target_url: "https://wkb.pages.dev", | ||
}); |
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,28 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: contains(github.event.head_commit.message, '[skip ci]') == false | ||
|
||
steps: | ||
- name: 📥 Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: 🔨 Prepare Bun environment | ||
uses: oven-sh/setup-bun@v2 | ||
with: | ||
bun-version: latest | ||
|
||
- run: curl -sfS https://dotenvx.sh/install.sh | sh | ||
|
||
- name: 🎉 Install project dependencies | ||
run: bun i | ||
|
||
- name: 😺 Check | ||
run: bun run test |
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 |
---|---|---|
|
@@ -28,3 +28,4 @@ src/routeTree.gen.ts | |
src/types/supabase.gen.ts | ||
tsconfig.tsbuildinfo | ||
.wrangler/ | ||
tsconfig.tsbuildinfo |
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
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.