Skip to content

Commit e3fcee0

Browse files
committed
Update npm scripts
1 parent 9939273 commit e3fcee0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ cp wrangler.toml.example wrangler.toml
2525
npm run dev
2626
```
2727

28-
## Deployment to production
28+
## Deployment (Github Actions)
2929

3030
In order to deploy your worker via Github Actions, you need to have a [Cloudflare API token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/) and running instance of InfluxDB.
3131

@@ -34,4 +34,6 @@ Add generated API token to Github secrets as `CLOUDFLARE_API_TOKEN` and authenti
3434
Other required environment variables include the following:
3535
- `INFLUX_URL` - InfluxDB URL
3636
- `INFLUX_DATABASE` - InfluxDB database (bucket) name
37-
- `INFLUX_METRIC_NAME` - InfluxDB metric name
37+
- `INFLUX_METRIC_NAME` - InfluxDB metric name
38+
39+
After setting up secrets, you can push your code to Github and worker will be deployed to production environment automatically.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"description": "A template for kick starting a Cloudflare Workers project",
66
"main": "index.js",
77
"scripts": {
8-
"deploy": "wrangler deploy --env dev",
9-
"deploy:prod": "wrangler deploy --env production",
8+
"deploy": "wrangler deploy --env production",
9+
"deploy:dev": "wrangler deploy --env dev",
1010
"dev": "wrangler dev --env dev",
1111
"start": "wrangler dev",
1212
"test": "vitest run",

0 commit comments

Comments
 (0)