Skip to content

Consolidate JS API gui module into common crate and rename GUI to Ord… #897

Consolidate JS API gui module into common crate and rename GUI to Ord…

Consolidate JS API gui module into common crate and rename GUI to Ord… #897

Workflow file for this run

name: GitHub Actions Vercel Production Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_V6 }}
on:
push:
branches:
- main
jobs:
Deploy-Preview:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
env:
COMMIT_SHA: ${{ github.sha }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1
- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
# restore and save a cache using this key
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
# if there's no cache hit, restore a cache by this prefix
restore-prefixes-first-match: nix-${{ runner.os }}-
# collect garbage until the Nix store size (in bytes) is at most this number
# before trying to save a new cache
# 1G = 1073741824
gc-max-store-size-linux: 1G
- run: ./prep-webapp.sh
env:
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }}
- run: nix develop .#webapp-shell -c npm run build
working-directory: packages/webapp
env:
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }}
# check for npm package blacklists pkgs across all packages
- uses: rainlanguage/github-chore/.github/actions/npm-blacklist@main
- uses: rainlanguage/github-chore/.github/actions/npm-blacklist@main
with:
working-directory: packages/orderbook
- uses: rainlanguage/github-chore/.github/actions/npm-blacklist@main
with:
working-directory: packages/ui-components
- name: Install Vercel CLI
run: npm install --global vercel@canary
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} packages/webapp
# forwards status to telegram chat if this ci fails or gets canceled, only runs for default branch
- name: Forward CI Status
if: always()
uses: rainlanguage/github-chore/.github/actions/telegram-status-report@main
with:
status: ${{ job.status }}
telegram-bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
telegram-chat-id: ${{ secrets.TELEGRAM_CHAT_ID }}