Add Gitea CI/CD workflow for Cloudflare Pages deployment
- Add deploy.yaml workflow triggered on prod branch push - Add push:prod script for convenience Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
46
.gitea/workflows/deploy.yaml
Normal file
46
.gitea/workflows/deploy.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
|
||||
name: Generate a build and push to Cloudflare Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- prod
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build and Deploy to Cloudflare Pages
|
||||
|
||||
steps:
|
||||
- name: git-checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: pnpm-setup
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- name: Deploy
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy ./build --project-name="2eInk"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"lint": "prettier --check . && eslint .",
|
||||
"format": "prettier --write ."
|
||||
"format": "prettier --write .",
|
||||
"push:prod": "git push origin main:prod"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^2.0.4",
|
||||
|
||||
Reference in New Issue
Block a user