add backend rpc url #21
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: build-ui | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "contracts/src/**" | |
- "contracts/utils/fetchAccount.ts" | |
- "contracts/server/challengeData.ts" | |
- "contracts/server/services/model.ts" | |
- "ui/**" | |
- ".github/workflows/build-ui.yml" | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "contracts/src/**" | |
- "contracts/utils/fetchAccount.ts" | |
- "contracts/server/challengeData.ts" | |
- "contracts/server/services/model.ts" | |
- "ui/**" | |
- ".github/workflows/build-ui.yml" | |
env: | |
VERSION: 0.1.${{ github.run_number }} | |
defaults: | |
run: | |
working-directory: ./ui | |
jobs: | |
build-pawket: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set Node.js 16.x (ui) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "yarn" | |
cache-dependency-path: "ui/yarn.lock" | |
- name: Set Node.js 16.x (contracts) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "npm" | |
cache-dependency-path: "contracts/package-lock.json" | |
- name: Install Dependencies (contracts) | |
run: yarn | |
working-directory: contracts/ | |
- name: Install Dependencies | |
run: yarn | |
- name: Change version number | |
run: | | |
sed -i "s/0.1/${VERSION}/" .env | |
- name: Build | |
run: | | |
yarn build | |
- name: version | |
run: | | |
echo ${VERSION}>dist/spa/version.txt | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ui | |
path: ui/dist/spa |