Skip to content

Commit be508ef

Browse files
AlexMikhalevclaude
andcommitted
ci: add Cloudflare Pages auto-deploy
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fc05651 commit be508ef

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy to Cloudflare Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
env:
10+
OP_API_TOKEN: op://TerraphimPlatform/terraphim-md-book-cloudflare/workers-api-token
11+
OP_ACCOUNT_ID: op://TerraphimPlatform/terraphim-md-book-cloudflare/account_id
12+
13+
jobs:
14+
deploy:
15+
name: Deploy
16+
runs-on: [self-hosted, linux, x64]
17+
permissions:
18+
contents: read
19+
deployments: write
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v6
23+
24+
- name: Load secrets from 1Password
25+
id: op-load-secrets
26+
uses: 1password/load-secrets-action@v2
27+
with:
28+
export-env: true
29+
env:
30+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
31+
CLOUDFLARE_API_TOKEN: ${{ env.OP_API_TOKEN }}
32+
CLOUDFLARE_ACCOUNT_ID: ${{ env.OP_ACCOUNT_ID }}
33+
34+
- name: Deploy to Cloudflare Pages
35+
uses: cloudflare/wrangler-action@v3
36+
with:
37+
apiToken: ${{ env.CLOUDFLARE_API_TOKEN }}
38+
accountId: ${{ env.CLOUDFLARE_ACCOUNT_ID }}
39+
command: pages deploy . --project-name=terraphim-rs --branch=main --commit-dirty=true

0 commit comments

Comments
 (0)