diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..0901545 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,22 @@ +name: Github Pages + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + + - name: Build + run: wasm-pack build -t web -d ./wasm/dist --out-name orgize ./wasm/ + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./wasm diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml deleted file mode 100644 index aa18101..0000000 --- a/.github/workflows/wasm.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Wasm - -on: [push, pull_request] - -defaults: - run: - working-directory: wasm - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-node@v1 - with: - node-version: "14" - - - name: Install - run: | - curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - yarn - - - name: Build - run: | - wasm-pack build --target web --out-dir wasm/pkg -- --features wasm - yarn build - - - name: Deploy to gh pages - uses: JamesIves/github-pages-deploy-action@4.1.5 - with: - branch: gh-pages - folder: wasm/lib