dependabot[bot] 747acb5cb4 Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 14:36:53 -05:00

46 lines
1.3 KiB
YAML

name: Validate and process static files
on: [pull_request, push]
jobs:
static:
runs-on: ubuntu-latest
env:
VALIDATOR_VERSION: 20.6.30
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3.0.0
with:
cache: npm
- uses: actions/setup-python@v3
with:
python-version: '3.10'
cache: pip
- name: Cache validator
id: validator-cache
uses: actions/cache@v2
with:
path: vnu-runtime-image
key: ${{ runner.os }}-validator-${{ env.VALIDATOR_VERSION }}
- run: sudo apt-get update
- run: sudo apt-get -y install libxml2-utils yajl-tools moreutils zopfli
- run: npm install
- run: pip install -r requirements.txt
- name: Download validatornu
# There isn't a package with a `validatornu` command in Ubuntu, so download the validator
# from the GitHub releases and change the process-static script later to use it.
run: curl -OL https://github.com/validator/validator/releases/download/${{ env.VALIDATOR_VERSION }}/vnu.linux.zip && unzip vnu.linux.zip
if: steps.validator-cache.outputs.cache-hit != 'true'
- run: sed -i 's+validatornu+vnu-runtime-image/bin/vnu+g' process-static
- name: process static
run: ./process-static