Update TR report #778
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
on: | |
schedule: | |
- cron: '0 1 * * *' | |
workflow_dispatch: | |
name: Update TR report | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run Reffy's crawler | |
run: | | |
mkdir report | |
node_modules/.bin/reffy --release --post csscomplete --post annotatelinks --post patchdfns --output report --fallback tr/index.json | |
# Update another Webref checkout to reduce the chances that the version we | |
# checked out is no longer in sync with origin by the time the crawl is over | |
- name: Checkout webref | |
uses: actions/checkout@v4 | |
with: | |
path: webref | |
- name: Copy report | |
run: rsync -av report/ webref/tr/ | |
- name: Drop extract files from specs that are no longer crawled | |
run: node tools/clean-dropped-specs-files.js tr | |
working-directory: webref | |
- name: Push updates to git | |
run: | | |
git config user.name "reffy-bot" | |
git config user.email "<>" | |
git remote set-url --push origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
git add -A | |
REFFY_SHA=$(../node_modules/.bin/reffy --version) | |
git commit -m "Update of TR report from new reffy run" -m "Using reffy commit $REFFY_SHA." | |
git push origin HEAD:main | |
working-directory: webref |