chore: add proper logs #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: rrp-web | |
on: | |
push: | |
branches: ["master"] | |
paths: | |
- 'rrp-web/**' | |
- 'lib/rktk-keymanager/**.rs' | |
- 'lib/rktk-rrp/**.rs' | |
- '.github/workflows/rrp-web.yml' | |
pull_request: | |
paths: | |
- 'rrp-web/**' | |
- 'lib/rktk-keymanager/**.rs' | |
- 'lib/rktk-rrp/**.rs' | |
- '.github/workflows/rrp-web.yml' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup rust | |
uses: ./.github/workflows/setup-rust | |
with: | |
components: "rust-src" | |
target: "wasm32-unknown-unknown" | |
tools: "wasm-pack" | |
- name: Build rust library | |
run: cd rrp-web/rrp-client-web && wasm-pack build --release | |
- uses: pnpm/action-setup@v4 | |
name: Setup pnpm | |
with: | |
version: 9 | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
cache-dependency-path: rrp-web/pnpm-lock.yaml | |
- name: pnpm install | |
run: cd rrp-web && pnpm install | |
- name: Type check rrp-web and build | |
run: cd rrp-web && pnpm tsc --noEmit && pnpm build | |
- name: Deploy | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
command: pages deploy ./dist --project-name=rrpc | |
workingDirectory: "rrp-web" |