Skip to content

Add blastscan

Add blastscan #89

Workflow file for this run

name: "Deploy"
on:
pull_request:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.6.0
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: Setup Build Environment
run: |
sudo apt-get update
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libkrb5-dev libxss1 dbus libgtk-3-0 libgbm1
- run: yarn global add node-gyp
- run: pnpm add -g vercel@32.5.0
- run: pnpm install
- name: Build
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
export DETH_IFRAME_URL="https://code.deth.net"
else
export DETH_IFRAME_URL="https://dethcode.vercel.app"
fi
yarn build
- run: pnpm prepare-deploy
# --- preview deployments
- name: Deploy host to Vercel - STAGING
uses: nick-fields/retry@v2
with:
command: |
cd packages/vscode-host/dist
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
vercel build --token=${{ secrets.VERCEL_TOKEN }} # creates vercel output directory
cp -R ./node_modules ./.vercel/output/static/ # force add node_modules to output directory
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
max_attempts: 3
timeout_minutes: 10
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_HOST_PREVIEW_HOST_PROJECT_ID }}
# --- production deployments (only on main)
- name: Deploy host to Vercel - PRODUCTION
if: ${{ github.ref == 'refs/heads/main' }}
uses: nick-fields/retry@v2
with:
command: |
cd packages/vscode-host/dist
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} # creates vercel output directory
cp -R ./node_modules ./.vercel/output/static/ # force add node_modules to output directory
vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
max_attempts: 3
timeout_minutes: 10
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_APP_PROJECT_ID }}
- name: Deploy entrypoint to Vercel - PRODUCTION
if: ${{ github.ref == 'refs/heads/main' }}
uses: nick-fields/retry@v2
with:
command: |
cd packages/entrypoint/dist
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} # creates vercel output directory
cp -R ./node_modules ./.vercel/output/static/ # force add node_modules to output directory
vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
max_attempts: 3
timeout_minutes: 10
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_ENTRYPOINT_PROJECT_ID }}