From e4e30653212fcae9df4a2377b0eac6fa3dbdb36b Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 21:51:57 +0700 Subject: [PATCH] automatic deployment --- .forgejo/workflows/deploy.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .forgejo/workflows/deploy.yml diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml new file mode 100644 index 0000000..8711dc9 --- /dev/null +++ b/.forgejo/workflows/deploy.yml @@ -0,0 +1,39 @@ +name: Build and Deploy + +on: + workflow_dispatch: + push: + branches: [ main ] + +jobs: + deploy: + runs-on: debian + steps: + - name: Update git + run: | + apt-get update -y + apt-get install -y git unzip + + - name: Checkout + uses: actions/checkout@v4 + with: + github-server-url: https://git.satr14.my.id + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: 'latest' + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Build + run: bun run build + env: + NODE_ENV: production + + - name: Deploy to Cloudflare Workers + run: bunx wrangler deploy --assets=./.svelte-kit/cloudflare + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}