Skip to content

Remove unchecked functions #89

Remove unchecked functions

Remove unchecked functions #89

Workflow file for this run

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
name: deploy
jobs:
publish:
name: Publish to Cloudflare Pages
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
statuses: write
steps:
- uses: actions/checkout@v3
- name: Download model
working-directory: ./examples/wasm
run: |
wget 'https://github.com/daac-tools/vibrato/releases/download/v0.5.0/bccwj-suw+unidic-cwj-3_1_1-extracted+compact.tar.xz'
tar xf ./bccwj-suw+unidic-cwj-3_1_1-extracted+compact.tar.xz
mv ./bccwj-suw+unidic-cwj-3_1_1-extracted+compact/system.dic.zst ./src/
- name: Install environment
run: |
rustup target add wasm32-unknown-unknown
cargo install trunk
- name: Build
working-directory: ./examples/wasm
run: trunk build --release
- name: Publish to Cloudflare Pages
id: cloudflare_pages_deploy
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: vibrato-demo
directory: ./examples/wasm/dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Add publish URL as commit status
uses: actions/github-script@v6
with:
script: |
const sha = context.payload.pull_request?.head.sha ?? context.sha;
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
context: 'Cloudflare Pages',
description: 'Cloudflare Pages deployment',
state: 'success',
sha,
target_url: "${{ steps.cloudflare_pages_deploy.outputs.url }}",
});