-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.12 KB
/
deploy.yml
File metadata and controls
39 lines (34 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Deploy to Cloudflare Pages
on:
push:
branches:
- main
workflow_dispatch:
env:
OP_API_TOKEN: op://TerraphimPlatform/terraphim-md-book-cloudflare/workers-api-token
OP_ACCOUNT_ID: op://TerraphimPlatform/terraphim-md-book-cloudflare/account_id
jobs:
deploy:
name: Deploy
runs-on: [self-hosted, linux, x64]
permissions:
contents: read
deployments: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Load secrets from 1Password
id: op-load-secrets
uses: 1password/load-secrets-action@v2
with:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ env.OP_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ env.OP_ACCOUNT_ID }}
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ env.CLOUDFLARE_API_TOKEN }}
accountId: ${{ env.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy . --project-name=terraphim-rs --branch=main --commit-dirty=true