Remove unchecked functions #89
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
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 }}", | |
}); |