| name: Wake up Bot on Glitch |
| |
| on: |
| schedule: |
| - cron: '*/5 * * * *' |
| workflow_dispatch: |
| |
| jobs: |
| wakeup: |
| runs-on: ubuntu-latest |
| |
| strategy: |
| matrix: |
| node-version: ['20.x'] |
| |
| steps: |
| - uses: actions/checkout@v4 |
| |
| - name: Use Node.js ${{ matrix.node-version }} |
| uses: actions/setup-node@v4 |
| with: |
| node-version: ${{ matrix.node-version }} |
| registry-url: https://registry.npmjs.org/ |
| |
| - name: Cache node modules |
| id: cache-dep |
| uses: actions/cache@v3 |
| env: |
| cache-name: cache-node-modules |
| with: |
| path: node_modules |
| key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} |
| |
| - name: Install dependencies |
| if: steps.cache-dep.outputs.cache-hit != 'true' |
| run: npm ci |
| |
| - name: Wake up bot |
| run: node --unhandled-rejections=strict src/glitch/wakeup.js |