Skip to content

Refresh investments data and re-deploy on daily basis #1020

Refresh investments data and re-deploy on daily basis

Refresh investments data and re-deploy on daily basis #1020

Workflow file for this run

name: Refresh investments data and re-deploy on daily basis
on:
push:
branches:
- master
schedule:
- cron: '0 17 * * *'
workflow_dispatch:
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- name: Connect to repository
uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/action-setup@v2.2.4
with:
version: 8.6.1
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: '20.x'
cache: 'pnpm'
- name: Install all required dependencies
run: pnpm install --frozen-lockfile
- name: Installing Chromium via Puppeteer
run: node ./node_modules/puppeteer/install.js
- name: Build the files
run: pnpm run scrap:build
- name: Scrap and renew the data
run: pnpm run scrap
- name: Recommit the data
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit --allow-empty -m "chore(ci): Refresh investments data"
git push
- name: Deploy to Vercel Now
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: '--prod'