1
mirror of https://github.com/jakejarvis/simpip.git synced 2025-04-26 05:45:21 -04:00

deploy worker the "right" way (via wrangler)

This commit is contained in:
Jake Jarvis 2020-10-13 12:05:31 -04:00
parent fac302d4dd
commit 75fb393b0a
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
5 changed files with 49 additions and 8 deletions

View File

@ -10,11 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: jakejarvis/cloudflare-worker-action@master
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_AUTH_EMAIL: ${{ secrets.CLOUDFLARE_AUTH_EMAIL }}
CLOUDFLARE_AUTH_KEY: ${{ secrets.CLOUDFLARE_AUTH_KEY }}
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_WORKER_NAME: 'simpip'
CLOUDFLARE_SCRIPT_NAME: 'index'
- uses: cloudflare/wrangler-action@1.3.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
environment: 'production'

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
node_modules/
vendor/
.env*
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
*.log

1
.npmrc Normal file
View File

@ -0,0 +1 @@
package-lock=false

28
package.json Normal file
View 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
View File

@ -0,0 +1,8 @@
name = "simpip"
type = "javascript"
account_id = "bd1a636a30a817137ce1e91c9e407373"
workers_dev = true
[env.production]
zone_id = "01417e1ce40cd6425a9ff87225bbd63a"
route = "simpip.com/*"