mirror of
https://github.com/jakejarvis/simpip.git
synced 2025-06-27 16:15:41 -04:00
deploy worker the "right" way (via wrangler)
This commit is contained in:
12
.github/workflows/deploy.yml
vendored
12
.github/workflows/deploy.yml
vendored
@ -10,11 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- uses: jakejarvis/cloudflare-worker-action@master
|
- uses: cloudflare/wrangler-action@1.3.0
|
||||||
env:
|
with:
|
||||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
apiToken: ${{ secrets.CF_API_TOKEN }}
|
||||||
CLOUDFLARE_AUTH_EMAIL: ${{ secrets.CLOUDFLARE_AUTH_EMAIL }}
|
environment: 'production'
|
||||||
CLOUDFLARE_AUTH_KEY: ${{ secrets.CLOUDFLARE_AUTH_KEY }}
|
|
||||||
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
|
|
||||||
CLOUDFLARE_WORKER_NAME: 'simpip'
|
|
||||||
CLOUDFLARE_SCRIPT_NAME: 'index'
|
|
||||||
|
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
node_modules/
|
||||||
|
vendor/
|
||||||
|
.env*
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
*.log
|
28
package.json
Normal file
28
package.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "simpip",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "A very simple web server that returns your IP address in plaintext...and literally nothing else.",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://simpip.com/",
|
||||||
|
"author": {
|
||||||
|
"name": "Jake Jarvis",
|
||||||
|
"email": "jake@jarv.is",
|
||||||
|
"url": "https://jarv.is/"
|
||||||
|
},
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"start": "cloudworker index.js",
|
||||||
|
"publish": "wrangler publish --env production"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/jakejarvis/simpip.git"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/jakejarvis/simpip/issues"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@cloudflare/wrangler": "^1.11.0",
|
||||||
|
"@dollarshaveclub/cloudworker": "^0.1.2"
|
||||||
|
}
|
||||||
|
}
|
8
wrangler.toml
Normal file
8
wrangler.toml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
name = "simpip"
|
||||||
|
type = "javascript"
|
||||||
|
account_id = "bd1a636a30a817137ce1e91c9e407373"
|
||||||
|
workers_dev = true
|
||||||
|
|
||||||
|
[env.production]
|
||||||
|
zone_id = "01417e1ce40cd6425a9ff87225bbd63a"
|
||||||
|
route = "simpip.com/*"
|
Reference in New Issue
Block a user