Skip to content

Commit

Permalink
updated github action
Browse files Browse the repository at this point in the history
  • Loading branch information
mehedi-sharif committed Jan 26, 2023
1 parent acea4e1 commit da37199
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 31 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
name: github pages
name: GitHub Pages

on:
push:
branches:
- main # Set a branch that will trigger a deployment
- main # Set a branch name to trigger deployment
pull_request:

jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Hugo setup
uses: peaceiris/actions-hugo@v2.6.0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.107.0"
extended: true

- uses: actions/cache@v2
with:
path: /tmp/hugo_cache
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-hugomod-
hugo-version: '0.101.0'

- name: Build
run: hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
# 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
7 changes: 0 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,5 @@
"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: 0 additions & 7 deletions themes/3mbed/layouts/partials/essentials/style.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@
{{ $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 da37199

Please sign in to comment.