Skip to content

Commit 89e2fd3

Browse files
committed
CI / cloudflare pages
1 parent c5f5c79 commit 89e2fd3

3 files changed

Lines changed: 28 additions & 16 deletions

File tree

.github/workflows/cf_pages_deploy.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ jobs:
2626
with:
2727
submodules: recursive
2828

29+
- name: Test env
30+
env:
31+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
32+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
33+
run: |
34+
echo "Account: $CLOUDFLARE_ACCOUNT_ID"
35+
36+
2937
# install just
3038
- uses: extractions/setup-just@v4
3139

@@ -48,23 +56,28 @@ jobs:
4856
with:
4957
python-version: '3.13'
5058

51-
- name: Setup interactive tmate session
52-
uses: mxschmitt/action-tmate@v3
59+
# - name: Setup interactive tmate session
60+
# uses: mxschmitt/action-tmate@v3
5361

54-
- name: Build Pyodide wheel
62+
- name: Prepare Pyodide build environment
5563
run: |
5664
just pyodide_setup_local_build
65+
66+
- name: Build Pyodide wheel
67+
run: |
5768
just pyodide_build
5869
59-
- name: Build Bundle Binaries
70+
- name: Build Bundle Explorer Binaries
6071
run: just ibex_build
6172

6273
- name: Stage site
63-
run: just cf_stage_all
74+
run: just cf_stage
75+
76+
- name: Install wrangler
77+
run: npm install -g wrangler
6478

6579
- name: Deploy to Cloudflare Pages
66-
uses: cloudflare/wrangler-action@v3
67-
with:
68-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
69-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
70-
command: pages deploy pyodide_projects/_cf_staging --project-name=imgui-bundle
80+
env:
81+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
82+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
83+
run: just cf_deploy

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ibex_build:
7676
cd build_ibex_ems && \
7777
if [ -f ~/emsdk/emsdk_env.sh ]; then source ~/emsdk/emsdk_env.sh; fi && \
7878
emcmake cmake .. -DCMAKE_BUILD_TYPE=Release -DIMMVISION_FETCH_OPENCV=ON && \
79-
make -j
79+
make -j 4
8080

8181
# Clean imgui bundle explorer emscripten build
8282
[group('ibex')]

pyodide_projects/cf_landing.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ <h1>Dear ImGui Bundle</h1>
4040
<a href="min_pyodide_app/demo_heart.source.txt">Minimal Pyodide Template - Source</a><br>
4141
<span class="desc">Minimal Template Source.</span>
4242
</li>
43-
44-
<!-- <li>-->
45-
<!-- <a href="explorer/">ImGui Bundle Explorer</a><br>-->
46-
<!-- <span class="desc">Interactive explorer for Dear ImGui Bundle C++ demos (Emscripten).</span>-->
47-
<!-- </li>-->
43+
<li>
44+
<a href="explorer/">ImGui Bundle Explorer</a><br>
45+
<span class="desc">Interactive explorer for Dear ImGui Bundle C++ demos (Emscripten).</span>
46+
</li>
4847

4948
</ul>
5049

0 commit comments

Comments
 (0)