Skip to content

Bump postcss from 8.5.3 to 8.5.13 #146

Bump postcss from 8.5.3 to 8.5.13

Bump postcss from 8.5.3 to 8.5.13 #146

Workflow file for this run

# Main test workflow
name: Tests
on:
pull_request:
branches: ["master", "main"]
env:
HUGO_VERSION: 0.139.3
NODE_VERSION: 23.x
jobs:
Build:
runs-on: ${{ vars.UBUNTU_VERSION }}
strategy:
fail-fast: false
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [ latest, 23.x, 22.x, 21, 20.x ]
name: Node.js ${{ matrix.node-version }}
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${{ env.HUGO_VERSION }}/hugo_extended_${{ env.HUGO_VERSION }}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass Embedded
run: sudo snap install dart-sass-embedded
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- run: npm test
# Make a Lighthouse Report
Lighthouse:
name: Lighthouse Report
needs: Build
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ${{ vars.UBUNTU_VERSION }}
permissions:
# Required to upload/save artifact, otherwise you'll get
# "Error: Resource not accessible by integration"
contents: write
# Required to post comment, otherwise you'll get
# "Error: Resource not accessible by integration"
pull-requests: write
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${{ env.HUGO_VERSION }}/hugo_extended_${{ env.HUGO_VERSION }}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass Embedded
run: sudo snap install dart-sass-embedded
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- run: npm run build --if-present
- name: Build with Hugo
working-directory: ./src
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--minify
- name: Run Hugo Server
working-directory: ./src
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
# Run server in background
run: hugo server &
# Wait till the server warms up
- run: sleep 15
- name: Disable AppArmor for Chrome
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Run Lighthouse Desktop
run: npm run lighthouse-desktop
- name: Run Lighthouse Mobile
run: npm run lighthouse-mobile
- name: Make Lighthouse Mobile Report Screenshot
run: npm run screenshot:mobile
- name: Make Lighthouse Desktop Report Screenshot
run: npm run screenshot:desktop
- name: Upload Lighthouse Report
id: lighthouseUploadReport
uses: actions/upload-artifact@v7
with:
name: Lighthouse-report
path: |
desktop.report.html
desktop.report.json
mobile.report.html
mobile.report.json
- name: Upload files to Imgbb
id: upload-files-imgbb
uses: McCzarny/upload-image@v2.0.5
with:
path: |
mobile.jpg
desktop.jpg
uploadMethod: imgbb
apiKey: '${{ secrets.IMGBB_API_KEY }}'
# Images will be automatically deleted after 7 days
expiration: 604800
- name: Publish info
uses: peter-evans/create-or-update-comment@v5
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
### Lighthouse Report
| Mobile | Desktop |
|----|----|
| ![Lighthouse Mobile Report Score](${{(fromJson(steps.upload-files-imgbb.outputs.urls))[0]}}) | ![Lighthouse Desktop Report Score](${{(fromJson(steps.upload-files-imgbb.outputs.urls))[1]}}) |
[Download report ZIP](${{ steps.lighthouseUploadReport.outputs.artifact-url }})
# Make screenshots of the resulting page
Screenshots:
name: Screenshots
needs: Build
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ${{ vars.UBUNTU_VERSION }}
permissions:
# Required to upload/save artifact, otherwise you'll get
# "Error: Resource not accessible by integration"
contents: write
# Required to post comment, otherwise you'll get
# "Error: Resource not accessible by integration"
pull-requests: write
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${{ env.HUGO_VERSION }}/hugo_extended_${{ env.HUGO_VERSION }}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass Embedded
run: sudo snap install dart-sass-embedded
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- run: npm run build --if-present
- name: Build with Hugo
working-directory: ./src
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--minify
- name: Disable AppArmor for Chrome
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Make screenshots
run: npm run screenshot
- name: Upload files as artifacts
id: upload-files-artifacts
uses: actions/upload-artifact@v7
with:
name: Screenshots
path: |
src/public/index.html
./*.jpg
- name: Upload files to Imgbb
id: upload-files-imgbb
uses: McCzarny/upload-image@v2.0.5
with:
# Device viewport sizes https://blisk.io/devices
path: |
360x780.jpg
780x360.jpg
768x1024.jpg
1024x768.jpg
1280x800.jpg
1920x1080.jpg
uploadMethod: imgbb
apiKey: '${{ secrets.IMGBB_API_KEY }}'
# Images will be automatically deleted after 7 days
expiration: 604800
- name: Publish the images
uses: peter-evans/create-or-update-comment@v5
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
#### Screenshots
| Phone Portrait Mode (360x780) | Phone Landscape Mode (780x360) |
|----|----|
| ![Phone Portrait Mode screenshot](${{(fromJson(steps.upload-files-imgbb.outputs.urls))[0]}}) | ![Phone Landscape Mode screenshot](${{(fromJson(steps.upload-files-imgbb.outputs.urls))[1]}}) |
| iPad Portrait Mode (768x1024) | iPad Landscape Mode (1024x768) |
|----|----|
| ![iPad Portrait Mode screenshot](${{(fromJson(steps.upload-files-imgbb.outputs.urls))[2]}}) | ![iPad Landscape Mode screenshot](${{(fromJson(steps.upload-files-imgbb.outputs.urls))[3]}}) |
| Laptop-S 1280x800 | Desktop 1920x1080 |
|----|----|
| ![Laptop-S 1280x800 screenshot](${{(fromJson(steps.upload-files-imgbb.outputs.urls))[4]}}) | ![Desktop 1920x1080 screenshot](${{(fromJson(steps.upload-files-imgbb.outputs.urls))[5]}}) |
[Full ZIP](${{ steps.upload-files-artifacts.outputs.artifact-url }})