diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 1b9d010..f0d04c6 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -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 \ No newline at end of file diff --git a/package.json b/package.json index e071b1f..4231e95 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/themes/3mbed/layouts/partials/essentials/style.html b/themes/3mbed/layouts/partials/essentials/style.html index 6a61dff..8ae830f 100755 --- a/themes/3mbed/layouts/partials/essentials/style.html +++ b/themes/3mbed/layouts/partials/essentials/style.html @@ -38,13 +38,6 @@ {{ $styles := $styles | resources.Concat "/css/style.css" }} - -{{ if and hugo.IsProduction site.Params.purge_css }} - {{ $styles = $styles | resources.PostCSS | fingerprint "sha256" }} - {{ $styles = $styles | resources.PostProcess }} -{{ end }} - -