deploy test app #34
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
name: deploy test app | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: [ci] | |
branches: [main] | |
types: [completed] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: true | |
env: | |
E2E_PATH: tests/e2e | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
defaults: | |
run: | |
working-directory: ${{ env.E2E_PATH }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
run_install: false | |
- run: pnpm install | |
- name: Build E2e test app | |
run: pnpm build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ${{ env.E2E_PATH }}/dist | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: build | |
runs-on: ubuntu-latest | |
name: Deploy | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |