-
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
0 parents
commit 2786ddc
Showing
18 changed files
with
4,691 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Deploy site | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
CI: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Prepare pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
- name: Prepare Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build Nitro | ||
run: pnpm build | ||
env: | ||
NITRO_PRESET: cloudflare | ||
- name: Deploy to Cloudflare Workers | ||
uses: cloudflare/wrangler-action@v3 | ||
with: | ||
accountId: ${{ secrets.CF_ACCOUNT_ID }} | ||
apiToken: ${{ secrets.CF_API_TOKEN }} | ||
command: deploy |
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,7 @@ | ||
node_modules | ||
dist | ||
.data | ||
.nitro | ||
.cache | ||
.output | ||
.env |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false |
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,5 @@ | ||
# API | ||
|
||
AlO misc services provider for our websites. | ||
|
||
Framework: Nitro |
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,22 @@ | ||
// https://nitro.unjs.io/config | ||
export default defineNitroConfig({ | ||
srcDir: "server", | ||
routeRules: { | ||
"/**": { | ||
cors: true, | ||
headers: { | ||
"Access-Control-Allow-Origin": "*", | ||
"Access-Control-Allow-Methods": "*", | ||
"Access-Control-Allow-Headers": "*", | ||
"Access-Control-Expose-Headers": "*", | ||
"Access-Control-Allow-Credentials": "true", | ||
}, | ||
}, | ||
"/photos/alice": { | ||
proxy: "https://avatars.githubusercontent.com/u/81961962", | ||
}, | ||
"/photos/yecdn/**": { | ||
proxy: "https://i.yecdn.com/images/**", | ||
}, | ||
}, | ||
}); |
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,18 @@ | ||
{ | ||
"name": "s-complex-api", | ||
"type": "module", | ||
"private": true, | ||
"scripts": { | ||
"build": "nitro build", | ||
"dev": "nitro dev", | ||
"prepare": "nitro prepare", | ||
"preview": "node .output/server/index.mjs" | ||
}, | ||
"devDependencies": { | ||
"nitropack": "^2.10.0", | ||
"wrangler": "^3.84.1" | ||
}, | ||
"dependencies": { | ||
"js-yaml": "^4.1.0" | ||
} | ||
} |
Oops, something went wrong.