helaili/jekyll-action

Support for running htmlproofer on the output before deploying

CorruptComputer opened this issue · 1 comments

Being able to test the generated HTML before deploying it to gh-pages would be incredibly helpful.
I use this to find broken links or images I forgot to add alt-text to.

I tried the following in my repo but it doesn't work since the build files seem to be deleted between the steps:

    - name: Build the site
      uses: helaili/jekyll-action@master
      with:
        build_only: true

    - name: Test the generated HTML for errors
      uses: chabad360/htmlproofer@master
      with:
        directory: "/github/jekyll_build"

I had to add jekyll_build_options: -d _site to get it to work, e.g.

      - name: Build the Jekyll site
        uses: helaili/jekyll-action@v2
        with:
          build_only: true
          jekyll_build_options: -d _site

      - name: Check HTML using htmlproofer
        uses: chabad360/htmlproofer@master
        with:
          directory: '_site'

You can see my full workflow file here: https://github.com/bmaupin/wiki/blob/master/.github/workflows/htmlproofer.yml