Skip to content

Deploy to GitHub Pages #527

Deploy to GitHub Pages

Deploy to GitHub Pages #527

Workflow file for this run

# This is a basic workflow to automatically build a Svelte app and deploy it to GitHub Pages
name: Deploy to GitHub Pages
on:
push:
branches:
- main
schedule:
# Runs "At minute 0 past hour 5 and 17." (see https://crontab.guru)
- cron: "0 5,17 * * *"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
- name: Get installed Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(grep '\"@playwright/test\":' ./package-lock.json | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')" >> $GITHUB_ENV
- name: Cache playwright binaries
uses: actions/cache@v3
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- name: Install dependencies
run: npm ci
- name: Install playwright browsers
run: npx playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- run: npx playwright install-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- name: Build Application
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
ALCHEMY_ETHEREUM: ${{ secrets.ALCHEMY_ETHEREUM }}
ALCHEMY_POLYGON: ${{ secrets.ALCHEMY_POLYGON }}
ALCHEMY_SOLANA: ${{ secrets.ALCHEMY_SOLANA }}
ALCHEMY_ARBITRUM: ${{ secrets.ALCHEMY_ARBITRUM }}
PUBLIC_DOMAIN: ${{ secrets.PUBLIC_DOMAIN }}
run: npm run build
- name: Run tests
run: npm run unit
- run: npm test
- run: npm run gen:previews
- run: touch build/.nojekyll
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update Asset Data
branch: main
file_pattern: ":/assets/**/*.json .aggregation/*.json"
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: build