Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fulldecent authored Apr 27, 2021
1 parent 249d506 commit d13a5b6
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,30 @@ The cache operates on external links only.

If caching is enabled, HTMLProofer writes to a log file called *tmp/.htmlproofer/cache.log*. You should probably ignore this folder in your version control system.

### Caching with Travis
### Caching with continuous integration

If you want to enable caching with Travis CI, be sure to add these lines into your _.travis.yml_ file:
Enable caching in your continuous integration process. It will make your builds faster.

**In GitHub Actions:**

Add this step to your build workflow before HTMLProofer is run:

```yaml
- name: Cache HTMLProofer
id: cache-htmlproofer
uses: actions/cache@v2
with:
path: tmp/.htmlproofer
key: ${{ runner.os }}-htmlproofer
```
Also make sure that your later step which runs HTMLProofer will not return a failed shell status. You can try something like `html-proof ... || true`. Because a failed step in GitHub Actions will skip all later steps.

**In Travis:**

If you want to enable caching with Travis CI, be sure to add these lines into your _.travis.yml_ file:

```yaml
cache:
directories:
- $TRAVIS_BUILD_DIR/tmp/.htmlproofer
Expand Down

0 comments on commit d13a5b6

Please sign in to comment.