Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typescipt support and delopy to cf button #13

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
18 changes: 18 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy Cloudfare worker
on:
push:
pull_request:
repository_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- name: Build & Deploy Worker
env:
AXIOM_DATASET: ${{ secrets.AXIOM_DATASET }}
AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }}
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need that file?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a Deploy to Cloudflare button is part of the steps to follow, from the documentation

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ Add triggers for the worker, e.g a route trigger:
then click `Save`.

When requests are made to the routes you setup, the worker will be triggered and you will see the logs delivered to your Axiom dataset.

[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/axiomhq/axiom-cloudflare-workers)
Bensigo marked this conversation as resolved.
Show resolved Hide resolved


48 changes: 47 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"author": "Axiom, Inc.",
"scripts": {
"format": "eslint '*/**/*.{js,ts}' --quiet --fix",
"lint": "eslint '*/**/*.{js,ts}'"
"lint": "eslint '*/**/*.{js,ts}'",
"build": "npx tsc"
},
"contributors": [
"Islam Schehata <islam@axiom.co>",
Expand All @@ -26,13 +27,16 @@
},
"homepage": "https://github.com/axiomhq/cloudflare#readme",
"devDependencies": {
"@cloudflare/workers-types": "^4.20230717.1",
"@types/node": "^20.4.4",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-promise": "^6.1.1",
"prettier": "^2.8.3"
"prettier": "^2.8.3",
"typescript": "^5.1.6"
},
"engines": {
"node": ">=14"
Expand Down
131 changes: 0 additions & 131 deletions src/worker.js

This file was deleted.

Loading