Skip to content

Commit

Permalink
Add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AllexVeldman committed May 17, 2024
1 parent 1aae71d commit 8502329
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.{yaml,yml}]
indent_size = 2
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Deploy

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
environment:
name: pyoci
url: https://pyoci.allexveldman.com

steps:
- uses: actions/checkout@v4
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: mixed-line-ending
args: [--fix=lf]
# - id: no-commit-to-branch
# name: Don't commit to the default branch
# args: [ --branch, main ]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/rhysd/actionlint
rev: v1.6.26
hooks:
- id: actionlint
4 changes: 4 additions & 0 deletions wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name = "pyoci"
main = "pyoci_worker/build/worker/shim.mjs"
compatibility_date = "2023-12-01"

# disable *.workers.dev
workers_dev = false
route = { pattern = "pyoci.allexveldman.nl", custom_domain = true }

# what worker-build does:
# - install wasm-pack
# - `wasm-pack build --no-typescript --target bundler --out-dir "build" --out-name "index" {args}`
Expand Down

0 comments on commit 8502329

Please sign in to comment.