Skip to content

Update tantivy to 0.22 and ruzstd to 0.7.0 #245

Update tantivy to 0.22 and ruzstd to 0.7.0

Update tantivy to 0.22 and ruzstd to 0.7.0 #245

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/vaporetto-models/releases/download/v0.5.0/bccwj-suw+unidic_pos+pron.tar.xz'
tar xf 'bccwj-suw+unidic_pos+pron.tar.xz'
mv ./bccwj-suw+unidic_pos+pron/bccwj-suw+unidic_pos+pron.model.zst ./src/
- uses: jetli/[email protected]
with:
version: 'latest'
- name: Build
working-directory: ./examples/wasm
run: |
rustup target add wasm32-unknown-unknown
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: vaporetto-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 }}",
});