Skip to content

Commit

Permalink
updated node version in github action
Browse files Browse the repository at this point in the history
  • Loading branch information
mehedi-sharif committed Jan 28, 2023
1 parent da37199 commit aee22ec
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,22 @@ jobs:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
node-version: 16

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.101.0'
hugo-version: '0.110.0'
extended: true

- name: Build
run: hugo --minify
run: npm install && hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# If you're changing the branch from main,
# also change the `main` in `refs/heads/main`
# below accordingly.
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_dir: ./public
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "gethugothemes-boilerplate",
"name": "3mdeb",
"version": "2.1.1",
"license": "UNLICENSED",
"author": "gethugothemes",
Expand All @@ -8,5 +8,12 @@
"test": "cd exampleSite; hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify || hugo server --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify",
"build": "cd exampleSite; hugo --gc --minify --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --forceSyncStatic || hugo --themesDir ../.. --gc --minify --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --forceSyncStatic",
"update": "hugo mod clean && hugo mod get -u ./... && hugo mod tidy"
},
"devDependencies": {
"@fullhuman/postcss-purgecss": "^5.0.0",
"postcss": "^8.4.20",
"postcss-cli": "^10.1.0",
"prettier": "^2.8.1",
"prettier-plugin-go-template": "0.0.13"
}
}
7 changes: 7 additions & 0 deletions themes/3mbed/layouts/partials/essentials/style.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
{{ $styles := $styles | resources.Concat "/css/style.css" }}


<!-- Purge CSS in Production -->
{{ if and hugo.IsProduction site.Params.purge_css }}
{{ $styles = $styles | resources.PostCSS | fingerprint "sha256" }}
{{ $styles = $styles | resources.PostProcess }}
{{ end }}


<link rel="stylesheet" href="{{ $styles.RelPermalink }}" />

<!-- <style type="text/css">{{$styles.Content | safeCSS}}</style> -->

0 comments on commit aee22ec

Please sign in to comment.