diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 148a6c4..6436242 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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