Skip to content

triggered_from_mainnet #60

triggered_from_mainnet

triggered_from_mainnet #60

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Triggered from mainnet
repository_dispatch:
types: [triggered_from_mainnet]
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
attestations: write
# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout 'test' branch of Main Repository
uses: actions/checkout@v4
with:
repository: SwapMarket/swapmarket.github.io
ref: test
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Update vite.config.mjs
run: |
sed -i "s|base: '/',*$|base: '/testnet/',|g" vite.config.mjs
- name: Update index.tsx
run: |
sed -i 's|base = "/";|base = "/testnet/";|g' src/index.tsx
- name: Copy config
run: npm run testnet
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Attest build provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: '${{ github.workspace }}/dist'
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4