Skip to content

Bump themes/adritian-free-hugo-theme from 9589e4e to c952ff0 #35

Bump themes/adritian-free-hugo-theme from 9589e4e to c952ff0

Bump themes/adritian-free-hugo-theme from 9589e4e to c952ff0 #35

name: Generate Critical CSS
# Run on pull requests to main
on:
pull_request:
branches: [main]
jobs:
generate-critical-css:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
submodules: true # Fetch Hugo themes
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install npm
run: npm install
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.136.2'
extended: true
- name: Build
run: hugo --minify --buildDrafts=true
- run: npm install
- name: Run critical script file
run: |
chmod +x ./critical-css.sh
./critical-css.sh
shell: bash
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: 'Update critical CSS'
add: 'assets/css/critical.css'