Push Notification #1032
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |