Send weekly table to Discord #45
This file contains 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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Send weekly table to Discord | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 10 * 1-4,9-12 6' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up chromedriver (if using act) # ? https://github.com/nektos/act/issues/588#issuecomment-1078427722 | |
if: ${{ env.ACT }} | |
run: | | |
sudo apt-get update && | |
wget "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" -P /tmp && | |
apt-get install -y "/tmp/google-chrome-stable_current_amd64.deb" -f | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build --if-present | |
- run: npm run start | |
env: | |
SCHOOL: ${{ secrets.SCHOOL }} | |
DEPT: ${{ secrets.DEPT }} | |
POS: ${{ secrets.POS }} | |
GROUP: ${{ secrets.GROUP }} | |
WEBHOOK_ID: ${{ secrets.WEBHOOK_ID }} | |
WEBHOOK_TOKEN: ${{ secrets.WEBHOOK_TOKEN }} | |
GH_GIST_ID: ${{ secrets.GH_GIST_ID }} | |
GH_PAT: ${{ secrets.GH_PAT }} |