Merge pull request #159 from hamidmuslih/hamid/enable-cache #76
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: Build and Web Wallet demo to Netlify | |
| on: | |
| # Runs on pushes targeting the default branch | |
| push: | |
| branches: ['main'] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Just | |
| uses: extractions/setup-just@v2 | |
| - name: install wasm-pack | |
| uses: jetli/wasm-pack-action@v0.4.0 | |
| with: | |
| version: latest | |
| - name: build pkg | |
| run: just build | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - run: corepack enable | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Build | |
| run: yarn web-wallet:build | |
| env: | |
| SNAP_ORIGIN: npm:@chainsafe/webzjs-zcash-snap | |
| - name: Get short SHA | |
| id: sha | |
| run: echo "short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| - name: Deploy to Netlify | |
| uses: nwtgck/actions-netlify@v3.0 | |
| with: | |
| publish-dir: './packages/web-wallet/dist' | |
| production-branch: main | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| deploy-message: "Deploy from GitHub Actions (${{ steps.sha.outputs.short }})" | |
| netlify-config-path: ./netlify.toml | |
| enable-pull-request-comment: false | |
| enable-commit-comment: true | |
| overwrites-pull-request-comment: true | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
| timeout-minutes: 1 |