Skip to content

Publish Weekly Stats #147

Publish Weekly Stats

Publish Weekly Stats #147

Workflow file for this run

name: Push AI stats to Teams
on:
schedule:
# https://crontab.guru/#0_12_*_*_1
- cron: "0 12 * * 1"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16.x"
cache: yarn
# Build v2
- name: Deps
run: |
yarn install
env:
YARN_CHECKSUM_BEHAVIOR: ignore
# Update the site stats
- run: node packages/typescriptlang-org/scripts/pingTeamsWithAppInsightData.js
env:
APP_INSIGHTS_API_KEY: ${{ secrets.APP_INSIGHTS_API_KEY }}
APP_INSIGHTS_ID: ${{ secrets.APP_INSIGHTS_ID }}
STATS_WEBHOOK_INCOMING_URL: ${{ secrets.STATS_WEBHOOK_INCOMING_URL }}
- name: Send a message to Microsoft Teams
if: ${{ failure() }}
uses: aliencube/[email protected]
with:
webhook_uri: ${{ secrets.TEAMS_WEB_BOT_INCOMING_URL }}
title: Updating site stats failed
summary: Something failed in the GitHub Action workflow
actions: '[{ "@type": "OpenUri", "name": "View Logs", "targets": [{ "os": "default", "uri": "https://github.com/microsoft/TypeScript-Website/actions/runs/${{ github.run_id }}?check_suite_focus=true" }] }]'