Skip to content

Commit 58f4035

Browse files
committed
New github pages strategy.
1 parent fc6598a commit 58f4035

9 files changed

+11
-940
lines changed

.github/workflows/cd.yml

+10-13
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
# Build wasm
4444
- name: Build WASM
45-
run: cd test-app && trunk --config Trunk.prod.toml build --release --filehash=false
45+
run: mkdir docs && cd test-app && trunk --config Trunk.prod.toml build --release --filehash=false
4646

4747
# Optmize wasm (We should use a higher level, but it never completes)
4848
- name: Optimize WASM
@@ -53,16 +53,13 @@ jobs:
5353
wasm-opt docs/test-app_bg.wasm -o docs/test-app_bg.opt.wasm -O1 --debug --strip-dwarf --strip-debug
5454
mv docs/test-app_bg.opt.wasm docs/test-app_bg.wasm
5555
56-
# Commit and push
57-
- name: Commit files
58-
run: |
59-
ls docs -l
60-
git config user.name github-actions[bot]
61-
git config user.email github-actions[bot]@users.noreply.github.com
62-
git add .
63-
git commit -m "Build Gallery"
64-
- name: Push changes
65-
uses: ad-m/github-push-action@master
56+
# Deploy
57+
- name: Setup Pages
58+
uses: actions/configure-pages@v3
59+
- name: Upload artifact
60+
uses: actions/upload-pages-artifact@v2
6661
with:
67-
github_token: ${{ secrets.GITHUB_TOKEN }}
68-
branch: ${{ github.ref }}
62+
path: './docs/'
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v2

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Cargo.lock
22
target/
3+
docs/
34
dist
45
.idea
56
*.xml

docs/index.html

-44
This file was deleted.

docs/loadingIndicator.js

-59
This file was deleted.

docs/main.css

-1
This file was deleted.

docs/scroll_to_top.css

-1
This file was deleted.

docs/switch.css

-1
This file was deleted.

0 commit comments

Comments
 (0)