Skip to content

Create snapshot of stats #404

Create snapshot of stats

Create snapshot of stats #404

Workflow file for this run

name: 'Create snapshot of stats'
on:
schedule:
- cron: '30 11 * * *'
workflow_dispatch:
env:
solana_version: 1.9.14
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: setup solana
run: |
sh -c "$(curl -sSfL https://release.solana.com/v${{ env.solana_version }}/install)"
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
solana-keygen new
- name: do a snapshot
run: |
git config --global user.email [email protected]
git config --global user.name invariantStats
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
export ANCHOR_WALLET="/home/runner/.config/solana/id.json"
npm install
npm run snap
git add ./data
git commit -m "Snapshot of data done!"
- name: GitHub Push
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
- name: Deploy to Production
uses: amondnet/vercel-action@v20
id: deploy-vercel-production
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: '--prod'
scope: ${{ secrets.VERCEL_ORG_ID }}