docs: fix missing infos / typos #200
This file contains hidden or 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: web-host | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set variables based on OS and architecture for just dl-wasi-sdk | |
| run: | | |
| if [ "${{ runner.arch }}" = "X64" ]; then | |
| echo "WASI_ARCH=x86_64" >> $GITHUB_ENV | |
| else | |
| echo "WASI_ARCH=arm64" >> $GITHUB_ENV | |
| fi | |
| if [ "${{ runner.os }}" = "Windows" ]; then | |
| echo "WASI_OS=windows" >> $GITHUB_ENV | |
| else | |
| echo "WASI_OS=linux" >> $GITHUB_ENV | |
| fi | |
| echo "WASI_VERSION_FULL=27.0" >> $GITHUB_ENV | |
| echo "WASI_VERSION=27" >> $GITHUB_ENV | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| override: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .nvmrc | |
| - uses: cargo-bins/cargo-binstall@main | |
| - uses: extractions/setup-just@v3 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - name: Install TinyGo Compiler | |
| run: | | |
| if [ "${{ runner.arch }}" = "X64" ]; then | |
| wget https://github.com/tinygo-org/tinygo/releases/download/v0.39.0/tinygo_0.39.0_amd64.deb | |
| sudo dpkg -i tinygo_0.39.0_amd64.deb | |
| else | |
| wget https://github.com/tinygo-org/tinygo/releases/download/v0.39.0/tinygo_0.39.0_armhf.deb | |
| sudo dpkg -i tinygo_0.39.0_armhf.deb | |
| fi | |
| export PATH=$PATH:/usr/local/bin | |
| - name: Check TinyGo Compiler | |
| run: tinygo version | |
| - name: Install wkg | |
| run: cargo binstall wkg | |
| - name: Install cargo-component | |
| run: cargo binstall [email protected] | |
| - name: Install wasm-tools | |
| run: cargo binstall [email protected] | |
| - name: Install wit-bindgen | |
| run: cargo install [email protected] | |
| - name: Install wasi-sdk | |
| run: | | |
| mkdir c_deps | |
| just dl-wasi-sdk | |
| - name: Install JavaScript dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run web-host:build | |
| - name: Install Playwright | |
| run: npx playwright install --with-deps | |
| working-directory: ./packages/web-host | |
| - name: e2e tests (playwright) | |
| run: WAIT_FOR_SERVER_AT_URL=http://localhost:4173/webassembly-component-model-experiments/ npm run test:e2e:all:preview | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: ./packages/web-host/playwright-report/ | |
| retention-days: 30 | |
| - name: Cache build artifacts | |
| id: cache-build-www-host | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./packages/web-host/dist | |
| key: ${{ runner.os }}-build-${{ github.sha }} | |
| deploy: | |
| if: github.ref == 'refs/heads/master' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Restore cached build artifacts | |
| id: cache-build-www-host-restore | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ./packages/web-host/dist | |
| key: ${{ runner.os }}-build-${{ github.sha }} | |
| - name: Configure GitHub Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload GitHub Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./packages/web-host/dist | |
| - name: Deploy GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |