Skip to content

Commit

Permalink
Merge pull request #15 from cyanolupus/deploy-over-sle-pt
Browse files Browse the repository at this point in the history
Add over-sle-pt deployment
  • Loading branch information
cyanolupus authored May 29, 2024
2 parents aed37f4 + ef73be6 commit 0be9b68
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,35 @@ jobs:
- name: Deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
run: npx wrangler deploy
run: |
npx wrangler r2 object put owari-shop/font.ttf --file="static/Koruri-Extrabold.ttf"
npx wrangler deploy
over-sle-pt-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Setup Wrangler
run: npm install wrangler --save-dev
- name: Setup Toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- uses: jetli/[email protected]
with:
version: 'latest'
- name: Rename
run: |
mv ./static/over-sle-pt.3tuples.json ./static/3tuples.json
mv ./over-sle-pt.wrangler.toml ./wrangler.toml
- name: Deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
run: |
npx wrangler r2 object put over-sle-pt/font.ttf --file="static/Koruri-Extrabold.ttf"
npx wrangler deploy
26 changes: 26 additions & 0 deletions .github/workflows/pull-request-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,32 @@ jobs:
- name: Deploy
run: npx wrangler deploy --dry-run


over-sle-pt-dry-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Setup Wrangler
run: npm install wrangler --save-dev
- name: Setup Toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- uses: jetli/[email protected]
with:
version: 'latest'
- name: Rename
run: |
mv ./static/over-sle-pt.3tuples.json ./static/3tuples.json
mv ./over-sle-pt.wrangler.toml ./wrangler.toml
- name: Deploy
run: npx wrangler deploy --dry-run

clippy:
permissions:
contents: read
Expand Down
30 changes: 30 additions & 0 deletions over-sle-pt.wrangler.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name = "over-sle-pt"
workers_dev = true
compatibility_date = "2023-01-15"
main = "build/worker/shim.mjs"

vars.WORKERS_RS_VERSION = "0.3.0"
vars.WILDCARDSUBDOMAIN_DOMAIN = "over-sle.pt"
vars.WILDCARDSUBDOMAIN_FONT = "font.ttf"
vars.WILDCARDSUBDOMAIN_TOP_HALF_TEXT = "ねす"
vars.WILDCARDSUBDOMAIN_BOTTOM_HALF_TEXT = "ぎた"
vars.WILDCARDSUBDOMAIN_HEIGHT = "256"
vars.WILDCARDSUBDOMAIN_WIDTH = "256"
vars.WILDCARDSUBDOMAIN_BACKGROUND_COLOR = "#000000ff"
vars.WILDCARDSUBDOMAIN_FONT_COLOR = "#cfcfcfff"

routes = [
"over-sle.pt/*",
"*.over-sle.pt/*",
]

[build]
command = "cargo install -q worker-build && worker-build --release" # required

[[r2_buckets]]
binding = "BUCKET"
bucket_name = "over-sle-pt"
preview_bucket_name = "over-sle-pt"

# read more about configuring your Worker via wrangler.toml at:
# https://developers.cloudflare.com/workers/cli-wrangler/configuration
7 changes: 7 additions & 0 deletions static/over-sle-pt.3tuples.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"default": {
"title": "",
"message": "おきれなかった...",
"emoji": "💤"
}
}

0 comments on commit 0be9b68

Please sign in to comment.