Skip to content

Commit 7fbf13d

Browse files
committed
fix dev deploy
1 parent 3a16058 commit 7fbf13d

File tree

6 files changed

+35
-13
lines changed

6 files changed

+35
-13
lines changed

.github/workflows/pull_request.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
branches: [main]
66

77
jobs:
8-
deploy-developement:
9-
environment: staging
8+
deploy-development:
9+
environment: development
1010
runs-on: ubuntu-latest
1111

1212
steps:
@@ -30,7 +30,7 @@ jobs:
3030
uses: cloudflare/wrangler-action@3424d15af26edad39d5276be3cc0cc9ffec22b55 # pin@1.3.0
3131
with:
3232
apiToken: ${{ secrets.CF_API_TOKEN }}
33-
environment: "staging"
33+
environment: "development"
3434

3535
# Post comment on PR with development deploy info
3636
- uses: actions/github-script@5d03ada4b0a753e9460b312e61cc4f8fdeacf163 # pin@0.9.0

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"scripts": {
77
"test": "echo \"Error: no test specified\"",
88
"format": "prettier --write '**/*.{js,css,json,md}'",
9-
"dev": "wrangler --env development dev",
10-
"ci": "wrangler --env development dev",
9+
"dev": "wrangler --env development_local dev",
10+
"ci": "wrangler --env development_local dev",
1111
"local": "wrangler dev"
1212
},
1313
"author": "Oskar Risberg <oskar.risberg@stendahls.se>",

script/ci/wrangler-ci.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ kv-namespaces = [
1111
{ binding = "QUERY_CACHE", id = "7ae67967cff24ceaa31ca58c5a6da798", preview_id = "7ae67967cff24ceaa31ca58c5a6da798" }
1212
]
1313

14-
[env.development]
14+
[env.development_local]
1515
# routes = ["dev.api.tarkov.dev/graphql", "dev.api.tarkov.dev/graphql*", "dev.api.tarkov.dev/___graphql", "dev.api.tarkov.dev/webhook*"]
1616
kv-namespaces = [
1717
{ binding = "DATA_CACHE", id = "17fd725f04984e408d4a70b37c817171", preview_id = "17fd725f04984e408d4a70b37c817171" },

webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const config = {
2-
mode: 'none', // "production" | "development" | "none"
2+
mode: 'production', // "production" | "development" | "none"
33
resolve: {
44
extensions: ['*', '.mjs', '.js', '.json']
55
},

webpack.dev.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const config = {
2+
mode: 'none', // "production" | "development" | "none"
3+
resolve: {
4+
extensions: ['*', '.mjs', '.js', '.json']
5+
},
6+
target: 'webworker',
7+
entry: './index.js',
8+
module: {
9+
rules: [
10+
{
11+
test: /\.mjs$/,
12+
include: /node_modules/,
13+
type: 'javascript/auto'
14+
}
15+
]
16+
}
17+
};
18+
19+
module.exports = config;

wrangler.toml

+9-6
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,33 @@ type = "webpack"
44
account_id = "424ad63426a1ae47d559873f929eb9fc"
55
zone_id = "777d475095752ccbe5d1d49e690a305b"
66
workers_dev = true
7-
webpack_config = "webpack.config.js"
7+
webpack_config = "webpack.dev.js"
88

99
[env.production]
10+
webpack_config = "webpack.config.js"
1011
routes = ["api.tarkov.dev/graphql", "api.tarkov.dev/graphql*", "api.tarkov.dev/___graphql", "api.tarkov.dev/webhook*"]
1112
kv-namespaces = [
1213
{ binding = "DATA_CACHE", id = "2e6feba88a9e4097b6d2209191ed4ae5", preview_id = "17fd725f04984e408d4a70b37c817171" },
1314
{ binding = "QUERY_CACHE", id = "7ae67967cff24ceaa31ca58c5a6da798", preview_id = "cf717460f7eb40299a0f8f844d157051" }
1415
]
1516
vars = { ENVIRONMENT = "production" }
1617

17-
[env.staging]
18-
routes = ["dev-api.tarkov.dev/*", "dev.api.tarkov.dev/graphql", "dev.api.tarkov.dev/graphql*", "dev.api.tarkov.dev/___graphql", "dev.api.tarkov.dev/webhook*"]
18+
[env.development]
19+
#routes = ["dev.api.tarkov.dev/graphql", "dev.api.tarkov.dev/graphql*", "dev.api.tarkov.dev/___graphql", "dev.api.tarkov.dev/webhook*"]
1920
kv-namespaces = [
2021
{ binding = "DATA_CACHE", id = "17fd725f04984e408d4a70b37c817171", preview_id = "17fd725f04984e408d4a70b37c817171" },
2122
{ binding = "QUERY_CACHE", id = "cf717460f7eb40299a0f8f844d157051", preview_id = "cf717460f7eb40299a0f8f844d157051" }
2223
]
23-
vars = { ENVIRONMENT = "staging" }
24+
vars = { ENVIRONMENT = "development" }
2425

25-
[env.development]
26+
[env.development_local]
2627
kv-namespaces = [
2728
{ binding = "DATA_CACHE", id = "2e6feba88a9e4097b6d2209191ed4ae5", preview_id = "17fd725f04984e408d4a70b37c817171" },
2829
{ binding = "QUERY_CACHE", id = "7ae67967cff24ceaa31ca58c5a6da798", preview_id = "cf717460f7eb40299a0f8f844d157051" }
2930
]
30-
vars = { ENVIRONMENT = "development" }
31+
vars = { ENVIRONMENT = "development_local" }
3132

3233
# [secrets]
3334
# CACHE_BASIC_AUTH
35+
# TWITCH_CLIENT_ID
36+
# TWITCH_TOKEN

0 commit comments

Comments
 (0)