Skip to content

Commit 73152d9

Browse files
committed
Fix Cloudflare Wrangler usage
1 parent abda3ce commit 73152d9

File tree

2 files changed

+33
-14
lines changed

2 files changed

+33
-14
lines changed

.github/workflows/deploy.yml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515

16+
- name: Use Node.js LTS
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: lts/*
20+
cache: npm
21+
1622
- name: Use Terraform
1723
uses: hashicorp/setup-terraform@v3
1824

@@ -99,29 +105,41 @@ jobs:
99105
echo "sentry=false" >> $GITHUB_OUTPUT;
100106
fi
101107
102-
- name: Setup Sentry
103-
uses: cloudflare/[email protected]
104-
if: ${{ steps.sentry-check.outputs.sentry == 'true' }}
105-
with:
106-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
107-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
108-
command: --version
109-
secrets: |
110-
SENTRY_DSN
111-
env:
112-
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
108+
# - name: Setup Sentry
109+
# if: ${{ steps.sentry-check.outputs.sentry == 'true' }}
110+
# uses: cloudflare/[email protected]
111+
# with:
112+
# apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
113+
# accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
114+
# command: --version
115+
# secrets: |
116+
# SENTRY_DSN
117+
# env:
118+
# SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
113119

114120
- name: Publish to Cloudflare Workers
115121
uses: cloudflare/[email protected]
116122
with:
117123
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
118124
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
119-
secrets: |
120-
CLOUDFLARE_API_TOKEN
121-
CLOUDFLARE_ACCOUNT_ID
125+
# secrets: |
126+
# CLOUDFLARE_API_TOKEN
127+
# CLOUDFLARE_ACCOUNT_ID
128+
# env:
129+
# CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
130+
# CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
131+
132+
- name: Setup Cloudflare Workers
133+
run: |
134+
echo "$CLOUDFLARE_API_TOKEN" | npx wrangler secret put CLOUDFLARE_API_TOKEN
135+
echo "$CLOUDFLARE_ACCOUNT_ID" | npx wrangler secret put CLOUDFLARE_ACCOUNT_ID
136+
if [ "${{ secrets.SENTRY_DSN }}" != '' ]; then
137+
echo "$SENTRY_DSN" | npx wrangler secret put SENTRY_DSN
138+
fi
122139
env:
123140
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
124141
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
142+
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
125143

126144
- name: Create a Sentry release
127145
uses: getsentry/action-release@v1

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ All the used Cloudflare products offer a [free plan](https://www.cloudflare.com/
6363

6464
> [!WARNING]
6565
> Dispoflare has no user registration.
66+
> You may need to setup Access Policy in [Cloudflare's Zero Trust](https://one.dash.cloudflare.com/) dashboard.
6667
6768
Dispoflare uses [Zero Trust Access](https://www.cloudflare.com/products/zero-trust/access/) to handle user authentication.
6869
It assumes that your users will register with another identity provider (Zero Trust supports [many providers](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/) or your custom one that implements [Generic SAML 2.0](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/generic-saml/)).

0 commit comments

Comments
 (0)