Skip to content

Update specs2-html to 4.20.4 #56

Update specs2-html to 4.20.4

Update specs2-html to 4.20.4 #56

Workflow file for this run

on:
pull_request_target:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
show_doc_diff:
timeout-minutes: 30
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
java-version: 8
distribution: temurin
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install pandoc
run: ./.github/install_pandoc.sh
- uses: coursier/cache-action@a0e7cd24be81bc84f0d7461e02bd1a96980553d7 # v6.4.4
- name: Generate html
run: ./.github/gen_doc.sh
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: gh-pages
path: gh-pages
- run: |
cp -r target/specs2-reports/site/* gh-pages/
pushd gh-pages
git checkout -- javascript
git diff > diff.txt
wc -l diff.txt
popd
- uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const diff = fs.readFileSync("gh-pages/diff.txt").toString();
if (diff.length === 0) {
console.log("no diff");
} else {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "```diff\n" + diff + "\n```"
});
}