-
Notifications
You must be signed in to change notification settings - Fork 9
36 lines (36 loc) · 1.51 KB
/
deploy-dev.yml
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
name: Deploy to dev Cloudflare Worker
on:
workflow_dispatch:
pull_request:
branches:
- stampy-redesign
types:
- closed
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN_APRILLION_WORKERS_DEV }}
jobs:
deploy:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Clone stampy-ui repository code
uses: actions/checkout@v3
- name: Deploy to Cloudflare
run: |
cat wrangler.toml.template \
| sed s/stampy-ui/redesign/ \
| sed s/{CLOUDFLARE_ACCT_ID}/${{ secrets.CLOUDFLARE_ACCT_ID_APRILLION_WORKERS_DEV }}/ \
| sed s/{STAMPY_KV_ID}/${{ secrets.STAMPY_KV_ID_APRILLION_WORKERS_DEV }}/ \
| sed s/{CODA_TOKEN}/${{ secrets.CODA_TOKEN }}/ \
| sed s/{CODA_INCOMING_TOKEN}/${{ secrets.CODA_INCOMING_TOKEN }}/ \
| sed s/{CODA_WRITES_TOKEN}/${{ secrets.CODA_WRITES_TOKEN }}/ \
| sed s/{MATOMO_DOMAIN}/${{ secrets.MATOMO_DOMAIN }}/ \
| sed s/{DISCORD_LOGGING_CHANNEL_ID}/${{ secrets.DISCORD_LOGGING_CHANNEL_ID }}/ \
| sed s/{DISCORD_LOGGING_TOKEN}/${{ secrets.DISCORD_LOGGING_TOKEN }}/ \
| sed s/{EDITOR_USERNAME}/${{ secrets.EDITOR_USERNAME }}/ \
| sed s/{EDITOR_PASSWORD}/${{ secrets.EDITOR_PASSWORD }}/ \
> wrangler.toml
npm ci
npm run deploy
- name: 'Debug: list files in build directory'
run: ls -R build public/build