Skip to content

GitHub Action to warm up caches of URLs located in XML sitemaps

License

Notifications You must be signed in to change notification settings

eliashaeussler/cache-warmup-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cache Warmup GitHub Action

CGL Tests Latest version

GitHub Action for eliashaeussler/cache-warmup, a library to warm up website caches of URLs located in XML sitemaps. Read more in the official documentation.

🔥 Usage

Important

The action requires at least version 0.7.0 of the eliashaeussler/cache-warmup library.

Create a new workflow or add a new step to your existing workflow:

# .github/workflows/cache-warmup.yaml

name: Cache Warmup
on:
  push:
    tags:
      - '*'

jobs:
  cache-warmup:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up environment
        uses: shivammathur/setup-php@v2
        with:
          php-version: 8.3
          coverage: none

      - name: Run cache warmup
        uses: eliashaeussler/cache-warmup-action@v1
        with:
          version: latest
          sitemaps: |
            https://www.example.com/sitemap.xml
            https://www.example.com/de/sitemap.xml
          urls: |
            https://www.example.com/another-url
          limit: 250
          progress: true
          verbosity: vvv
          config: cache-warmup.json

📝 Inputs

The following inputs are currently available:

Name Description Default Required
version Version of the eliashaeussler/cache-warmup library to use (must be at least 0.7.0) latest
sitemaps URLs or local filenames of XML sitemaps to be warmed up, separated by newline
urls Additional URLs to be warmed up, separated by newline
limit Limit the number of URLs to be processed 0
progress Show a progress bar during cache warmup
verbosity Increase output verbosity (v, vv or vvv)
config Path to an external configuration file (supported since v3 of the eliashaeussler/cache-warmup library)

💬 Outputs

The following outputs are currently generated:

Name Description
version Used version of the eliashaeussler/cache-warmup library

⭐ License

This project is licensed under GNU General Public License 3.0 (or later).