-
-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (38 loc) · 1.17 KB
/
calculate-metrics.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
40
41
42
43
44
45
46
47
name: Calculate Metrics
on:
workflow_dispatch:
jobs:
calculate-metrics:
runs-on: ubuntu-latest
name: Calculate Metrics
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: true
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- name: Install npm dependencies
run: npm install -g markdownlint-cli tldr-lint
- name: Run the script and generate artifacts
run: |
rm -f metrics.log
./scripts/calculate-metrics.sh 2>&1 | tee metrics.log
exit ${PIPESTATUS[0]}
- name: Commit the Calculate Metrics log file
if: always()
run: |
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git add metrics.log && git commit -m "metrics: update metrics log" && git push
- name: Upload Calculate Metrics artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: metrics
path: |
metrics.log
*.txt
check-pages*/*.txt