Skip to content

chore(deps): update actions/upload-pages-artifact action to v4 (#70) #30

chore(deps): update actions/upload-pages-artifact action to v4 (#70)

chore(deps): update actions/upload-pages-artifact action to v4 (#70) #30

Workflow file for this run

name: Test HTML
on:
pull_request:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Generate index.html
uses: docker://pandoc/core:3.7.0.2@sha256:3ff4301f49f60ea85d8d7e6660dda8ec4beb08ffbe9ae826129fbeb828b2b92c
with:
args: >-
--standalone --template=template.html --output=index.html README.md
- name: Validate title tag
run: |
count_open=$(grep -o '<title>' index.html | wc -l)
count_close=$(grep -o '</title>' index.html | wc -l)
if [ "$count_open" -ne 1 ] || [ "$count_close" -ne 1 ]; then
echo "Expected exactly one <title> tag and one </title> tag, found $count_open and $count_close"
exit 1
fi
close_count=$(grep -o '</title>' index.html | wc -l)
if [ "$close_count" -ne 1 ]; then
echo "Expected exactly one </title> tag, found $close_count"
exit 1
fi