Skip to content

Commit 1c377ca

Browse files
committed
Feature: added export script for Strapi Export
1 parent a74c634 commit 1c377ca

File tree

5 files changed

+874
-663
lines changed

5 files changed

+874
-663
lines changed

.github/workflows/deploy.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,14 @@ jobs:
5555
uses: actions/setup-node@v4
5656
with:
5757
node-version: 20
58-
cache: 'pnpm'
58+
cache: "pnpm"
5959
- run: pnpm install
6060
- run: pnpm run build
61+
62+
# Create backend export
63+
- run: node scripts/strapiToJson.py
64+
- run: mv exports build/export
65+
6166
- uses: actions/upload-artifact@v4
6267
with:
6368
name: build-cache-gp
@@ -97,10 +102,15 @@ jobs:
97102
uses: actions/setup-node@v4
98103
with:
99104
node-version: 20
100-
cache: 'pnpm'
105+
cache: "pnpm"
101106
- run: pnpm install
102107
- run: pnpm run build
103108
- run: echo "$(envsubst < build/index.html)" > build/index.html
109+
110+
# Create backend export
111+
- run: node scripts/strapiToJson.py
112+
- run: mv exports build/export
113+
104114
- uses: actions/upload-artifact@v4
105115
with:
106116
name: build-cache-prod

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ yarn-error.log*
2626
Digital-Export
2727

2828
.env
29+
30+
# Strapi Exports
31+
exports

Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ ENV REACT_APP_PUBLIC_URL=/
3030
RUN sed -i "s|base: '/thilo/',|base: '/',|g" vite.config.ts
3131
RUN npm install
3232
RUN export NODE_OPTIONS=--openssl-legacy-provider && npm run build
33+
34+
# Create backend export
35+
RUN node src/scripts/strapiToJson.js
36+
RUN mv exports build/exports
37+
3338
RUN chmod +x entrypoint.sh
3439
RUN dos2unix entrypoint.sh
3540

0 commit comments

Comments
 (0)