Skip to content

Commit

Permalink
feat(ci): gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
kettei-sproutty committed Jan 16, 2024
1 parent d84e323 commit 1ca0d0e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and Deploy
on:
push:
branches:
- main

permissions:
contents: write

jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: oven-sh/setup-bun@v1
- run: cargo fmt --all -- --check
- run: cargo install wasm-pack
- run: wasm-pack build
- run: cd example && bun install && bun run build && cd ..
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: example/dist
5 changes: 4 additions & 1 deletion example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ node_modules
package-lock.json
yarn.lock
pnpm-lock.yaml
!bun.lockb
!bun.lockb

# Output
dist
3 changes: 2 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"dev:vite": "vite",
"dev:wasm": "cd .. && cargo watch -i \".gitignore\" -i \"pkg/*\" -i \"example/*\" -s \"wasm-pack build\" -s \"cd example && bun install\"",
"dev": "concurrently \"bun dev:wasm\" \"bun dev:vite\""
"dev": "concurrently \"bun dev:wasm\" \"bun dev:vite\"",
"build": "vite build"
},
"dependencies": {
"@scuderia-fe/docx-to-html": "file:../pkg"
Expand Down

0 comments on commit 1ca0d0e

Please sign in to comment.