Skip to content

Deploy to GitHub Pages #20

Deploy to GitHub Pages

Deploy to GitHub Pages #20

Workflow file for this run

name: Deploy to GitHub Pages
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
workflow_run:
workflows: [Tests]
types: [completed]
branches: [main]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
check-latest: true
node-version-file: .node-version
- run: npm ci
- run: ls -lsah data
- uses: actions/cache/restore@v3
id: cache-restore
with:
path: data
key: data-${{ github.sha }}
- run: ls -lsah data
- run: npm run sync-coinbase
env:
npm_config_coinbase_api_key: ${{ secrets.coinbase_api_key }}
npm_config_coinbase_api_secret: ${{ secrets.coinbase_api_secret }}
npm_config_coinbase_api_base: ${{ vars.coinbase_api_base }}
- run: ls -lsah data
- uses: actions/cache/save@v3
id: cache-save
with:
path: data
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
- run: npm run build-coinbase
- uses: actions/configure-pages@v3
- uses: actions/upload-pages-artifact@v2
with:
path: 'www'
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- id: deployment
uses: actions/deploy-pages@v2