Skip to content

fix version

fix version #2

Workflow file for this run

on:
workflow_run:
workflows: ["Build HTML"]
types:
- completed
name: Lint prose with Vale
jobs:
vale:
name: Check HTML with Vale
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v4
- name: 'Download artifacts'
uses: actions/[email protected]
with:

Check failure on line 22 in .github/workflows/vale.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/vale.yml

Invalid workflow file

You have an error in your yaml syntax on line 22
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifacts = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr" || artifact.name == "out"
});
var fs = require('fs');
matchArtifacts.forEach((matchArtifact) => {
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
fs.writeFileSync('${{github.workspace}}/' + matchArtifact.name + '.zip', Buffer.from(download.data));
});
- name: Display structure of downloaded files
run: ls -R
- name: Install prose linter
run: |
sudo snap install vale
- name: Preprocess HTML for prose linter
run: |
# First the HTML needs preprocessing to work well with Vale
pushd _out
python3 -m venv venv
. venv/bin/activate
pip install beautifulsoup4
python ../.vale/scripts/rewrite_html.py html-multi html-vale
popd
- name: Prose linter
run: |
set -o pipefail
vale --output JSON _out/html-vale/ | python .vale/scripts/report.py
- name: Offline link checker (non-release)
uses: lycheeverse/[email protected]
if: github.event_name == 'push' || github.event_name == 'pull_request'
with:
fail: true
args: --base './_out/html-multi/' --no-progress --offline './_out/html-multi/**/*.html'