forked from microsoft/STL
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (38 loc) · 1.22 KB
/
update-status-chart.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: Update Status Chart
on:
schedule:
- cron: "0 7 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
if: ${{ github.repository == 'microsoft/STL' }}
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ">=22.2.0"
- name: Install Packages
run: |
npm ci
- name: Compile And Run gather_stats.mts
run: |
SECRET_GITHUB_PERSONAL_ACCESS_TOKEN="${{ github.token }}" npm run gather
- name: Compile And Bundle status_chart.mts
run: |
npm run make
- name: Commit Changes
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add src/daily_table.mts src/monthly_table.mts built/status_chart.mjs
git diff-index --quiet HEAD || git commit -m "Automated update."
git push origin gh-pages