Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/theme v1.3.5 #228

Merged
merged 10 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ name: "CodeQL"
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]

schedule:
- cron: '25 6 * * 6'

Expand All @@ -29,10 +27,7 @@ jobs:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed


steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/generate-critical-css.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Generate Critical CSS
# Run on pull requests to main
on:
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
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@v7
with:
message: 'Update critical CSS'
add: 'assets/css/critical.css'
15 changes: 12 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: 'npm'

- name: Install postcss
run: npm install postcss-cli
- name: Install npm
run: npm install

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
Expand All @@ -33,6 +33,15 @@ jobs:
- name: Build
run: hugo --minify --buildDrafts=true

- name: Run critical css
run: npm run critical-css

- name: Commit critical css
uses: EndBug/add-and-commit@v7
with:
message: 'Update critical CSS'
add: 'assets/css/critical.css'

- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-submodules.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update submodules (theme)
name: Update submodules (demo theme)

# Controls when the action will run.
on:
Expand Down
2 changes: 1 addition & 1 deletion assets/css/critical.css

Large diffs are not rendered by default.