Add BUILD.md instructions #13
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: Deploy UI to GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build-and-deploy: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.upload-artifact.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
- name: Build Packages | |
run: yarn build:packages | |
- name: Build UI | |
run: yarn workspace hyperdrive-trading build | |
env: | |
VITE_BASE_PATH: "/${{ github.event.repository.name }}/" | |
VITE_MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} | |
VITE_BASE_RPC_URL: ${{ secrets.BASE_RPC_URL }} | |
VITE_GNOSIS_NODE_RPC_URL: ${{ secrets.GNOSIS_RPC_URL }} | |
VITE_LINEA_RPC_URL: ${{ secrets.LINEA_RPC_URL }} | |
VITE_SHOW_BANNER: true | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: apps/hyperdrive-trading/dist/ | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} |