ci: fix ci

This commit is contained in:
PoiScript 2023-11-13 17:19:02 +08:00
parent c61f90851c
commit 1f19ceb153
No known key found for this signature in database
GPG key ID: 22C2B1249D99985E

View file

@ -41,11 +41,26 @@ jobs:
command: test
args: --all-features
build-wasm:
gh-pages:
if: github.ref == 'refs/heads/v0.10'
permissions:
contents: read
pages: write
id-token: write
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
@ -53,35 +68,11 @@ jobs:
- name: Build
run: wasm-pack build -t web -d ./wasm/dist --out-name orgize ./wasm/
- uses: actions/upload-artifact@master
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
name: page
path: ./wasm
if-no-files-found: error
path: "./wasm"
deploy:
permissions:
contents: read
pages: write
id-token: write
if: github.ref == 'refs/heads/v0.10'
runs-on: ubuntu-latest
needs: build-wasm
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/download-artifact@master
with:
name: page
path: .
- uses: actions/configure-pages@v1
- uses: actions/upload-pages-artifact@v1
with:
path: .
- id: deployment
uses: actions/deploy-pages@main
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2