Skip to content

Commit 5cfcd5a

Browse files
committed
fix: scripts
1 parent 27834e8 commit 5cfcd5a

File tree

8 files changed

+257
-412
lines changed

8 files changed

+257
-412
lines changed

.github/workflows/deploy-docs.yml

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

.github/workflows/deploy.yml

Lines changed: 12 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
name: Deploy to GitHub Pages
1+
name: Deploy ZKPDF
22

33
on:
44
push:
55
branches: [main, dev]
6+
paths:
7+
- "app/**"
8+
- "docs/**"
9+
- "pdf-utils/**"
10+
- "scripts/**"
11+
- ".github/workflows/deploy.yml"
612
pull_request:
713
branches: [main]
814

@@ -43,69 +49,20 @@ jobs:
4349
target: wasm32-unknown-unknown
4450
override: true
4551

46-
- name: Install dependencies
47-
run: yarn install --frozen-lockfile
48-
working-directory: ./app
52+
- name: Make deploy script executable
53+
run: chmod +x scripts/deploy.sh
4954

50-
- name: Build WASM
51-
run: |
52-
cd pdf-utils/wasm
53-
chmod +x generate_wasm.sh
54-
./generate_wasm.sh
55-
56-
- name: Copy WASM files to public directory
57-
run: |
58-
mkdir -p app/public/pkg
59-
cp pdf-utils/wasm/pkg/* app/public/pkg/
60-
61-
- name: Build Next.js app
62-
run: yarn build
63-
working-directory: ./app
64-
65-
- name: Install mdbook
66-
run: cargo install mdbook
67-
68-
- name: Build documentation
69-
run: |
70-
cd docs
71-
chmod +x build.sh
72-
./build.sh
55+
- name: Deploy using unified script
56+
run: ./scripts/deploy.sh all
7357

7458
- name: Setup Pages
7559
uses: actions/configure-pages@v4
7660

77-
- name: Create combined deployment
78-
run: |
79-
# Create a combined deployment directory
80-
mkdir -p combined-deploy
81-
82-
# Copy app files to root
83-
cp -r app/out/* combined-deploy/
84-
85-
# Copy docs to /docs subdirectory
86-
mkdir -p combined-deploy/docs
87-
cp -r docs/book/* combined-deploy/docs/
88-
89-
# Create a simple index.html redirect for docs
90-
cat > combined-deploy/docs/index.html << 'EOF'
91-
<!DOCTYPE html>
92-
<html>
93-
<head>
94-
<meta charset="utf-8">
95-
<title>ZKPDF Documentation</title>
96-
<meta http-equiv="refresh" content="0; url=./introduction.html">
97-
</head>
98-
<body>
99-
<p>Redirecting to documentation... <a href="./introduction.html">Click here</a></p>
100-
</body>
101-
</html>
102-
EOF
103-
10461
- name: Upload combined artifact
10562
uses: actions/upload-pages-artifact@v3
10663
with:
10764
path: ./combined-deploy
10865

109-
- name: Deploy app to GitHub Pages
66+
- name: Deploy to GitHub Pages
11067
id: deployment
11168
uses: actions/deploy-pages@v4

DEPLOYMENT.md

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

app/deploy.sh

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

deploy-all.sh

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

0 commit comments

Comments
 (0)