Skip to content

Commit 54ed64d

Browse files
authored
Cloudflare storybook fixes (#3068)
* Cloudflare storybook fixes * Small fix * Small fix * Small fix * Small fix * Small fix * Small fix
1 parent 8ec5d6a commit 54ed64d

File tree

3 files changed

+33
-24
lines changed

3 files changed

+33
-24
lines changed

.github/workflows/deploy_prod.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ jobs:
3838
- name: "Sentry: Upload sourcemaps"
3939
run: |
4040
docker run -w /app/front_end -e SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} registry.heroku.com/$HEROKU_APP/web npx sentry-cli sourcemaps upload /app/front_end/.next/ --project metaculus-frontend --org metaculus
41+
deploy-storybook:
42+
needs: [ deploy-to-prod ]
43+
uses: ./.github/workflows/storybook.yml
44+
secrets: inherit

.github/workflows/storybook.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy storybook
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
deploy-to-prod:
8+
runs-on: ubuntu-24.04
9+
environment: prod_env
10+
defaults:
11+
run:
12+
working-directory: front_end
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
cache: npm
20+
cache-dependency-path: front_end/package-lock.json
21+
- run: npm ci
22+
- run: npm run build-storybook
23+
- name: Deploy to Cloudflare Pages
24+
uses: cloudflare/wrangler-action@v3
25+
with:
26+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
27+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
28+
command: |
29+
pages deploy ./front_end/storybook-static --project-name=${{ secrets.CLOUDFLARE_PROJECT }} --branch=${{ github.ref_name }}

.github/workflows/storybook_prod.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)