mirror of https://github.com/kevquirk/512kb.club
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
891 B
25 lines
891 B
on: |
|
pull_request: |
|
paths: |
|
- _data/sites.yml |
|
|
|
name: Measure page size |
|
|
|
jobs: |
|
measure: |
|
name: Check size of requested site |
|
runs-on: ubuntu-latest |
|
steps: |
|
- uses: actions/checkout@v3 |
|
with: |
|
ref: ${{github.event.pull_request.head.ref}} |
|
repository: ${{github.event.pull_request.head.repo.full_name}} |
|
- run: git fetch origin ${{ github.event.pull_request.base.ref }} |
|
- name: install puppeteer dependencies |
|
run: | |
|
sudo apt-get update |
|
sudo apt-get install -y libgbm1 libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev libasound2 |
|
- uses: actions/setup-node@v2 |
|
- run: npm install |
|
- run: echo "NEW_URL=$(git diff origin/${{ github.event.pull_request.base.ref }} _data/sites.yml | grep 'url:' | grep + | cut -d " " -f 4)" >> $GITHUB_ENV |
|
- run: node scripts/measure.js $NEW_URL
|
|
|