Skip to content

Push Notification

Push Notification #576

name: Push Notification
on:
push:
branches:
- main
schedule:
- cron: '0 11 * * *'
jobs:
run-script:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./scrapper
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
# cache: 'npm'
# cache-dependency-path: ./scrapper/package-lock.json
- name: Install dependencies
run: npm install
- name: Decode base64-encoded service account
run: |
echo "${{ secrets.SERVICE_ACCOUNT }}" | base64 --decode > service-account.json
- name: Set environment variable
run: |
echo "SERVICE_ACCOUNT=$(jq -c . < service-account.json)" >> $GITHUB_ENV
- name: Run script
run: node push_notification.js