Cherry-pick code from issue #3896 and #3852 #113
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: Web Runner | |
on: | |
pull_request: | |
branches: | |
- web-runner | |
- web-runner-demo | |
push: | |
branches: | |
- web-runner | |
- web-runner-demo | |
jobs: | |
master: | |
strategy: | |
matrix: | |
step: ['web-runner:build-zip'] | |
name: ${{ matrix.step }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_PAT }} | |
- name: ${{ matrix.step }} | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
GH_PAT: ${{ secrets.GH_PAT }} | |
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }} | |
GH_RELEASE_FILES: master-build.zip,master-src.zip | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
TRANSAK_API_KEY: ${{ secrets.TRANSAK_API_KEY }} | |
COINBASE_PAY_ID: ${{ secrets.COINBASE_PAY_ID }} | |
CHAINFLIP_BROKER_API: ${{ secrets.CHAINFLIP_BROKER_API }} | |
BITTENSOR_API_KEY_1: ${{ secrets.BITTENSOR_API_KEY_1 }} | |
BITTENSOR_API_KEY_2: ${{ secrets.BITTENSOR_API_KEY_2 }} | |
BITTENSOR_API_KEY_3: ${{ secrets.BITTENSOR_API_KEY_3 }} | |
BITTENSOR_API_KEY_4: ${{ secrets.BITTENSOR_API_KEY_4 }} | |
BITTENSOR_API_KEY_5: ${{ secrets.BITTENSOR_API_KEY_5 }} | |
BITTENSOR_API_KEY_6: ${{ secrets.BITTENSOR_API_KEY_6 }} | |
BRANCH_NAME: master | |
run: | | |
yarn install --immutable | grep -v 'YN0013' | |
yarn ${{ matrix.step }} | |
- name: Deploy Webrunner to Netlify | |
id: netlify_deployment | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: './packages/web-runner/build' | |
production-branch: master | |
github-token: ${{ secrets.GH_PAT }} | |
deploy-message: ${{ github.event.head_commit.message }} | |
enable-pull-request-comment: true | |
enable-commit-comment: true | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_WEB_RUNNER_SITE_ID }} | |
timeout-minutes: 1 | |
- name: Notify to Discord | |
uses: sarisia/actions-status-discord@v1 | |
if: always() | |
with: | |
webhook: ${{ secrets.DISCORD_WEBHOOK }} | |
status: ${{ job.status }} | |
username: Extension Worker | |
title: ${{ github.workflow }} | |
description: | | |
Web-runner is completed. | |
- Web-runner: ${{ steps.netlify_deployment.outputs.deploy-url }} |