11# Sample workflow for building and deploying a Hugo site to GitHub Pages
2- name : Deploy Hugo site to Pages
2+ name : CYBERTEC-pg-operator
33
44on :
55 # Runs on pushes targeting the default branch
66 push :
77 branches :
8- - main
8+ - documentation
99
1010 # Allows you to run this workflow manually from the Actions tab
1111 workflow_dispatch :
@@ -32,50 +32,36 @@ jobs:
3232 build :
3333 runs-on : ubuntu-latest
3434 env :
35- HUGO_VERSION : 0.145.0
36- HUGO_ENVIRONMENT : production
35+ HUGO_VERSION : 0.115.4
3736 steps :
3837 - name : Install Hugo CLI
3938 run : |
4039 wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
41- && sudo dpkg -i ${{ runner.temp }}/hugo.deb
40+ && sudo dpkg -i ${{ runner.temp }}/hugo.deb
4241 - name : Install Dart Sass
4342 run : sudo snap install dart-sass
4443 - name : Checkout
45- uses : actions/checkout@v4
44+ uses : actions/checkout@v3
4645 with :
4746 submodules : recursive
4847 fetch-depth : 0
4948 - name : Setup Pages
5049 id : pages
51- uses : actions/configure-pages@v5
50+ uses : actions/configure-pages@v3
5251 - name : Install Node.js dependencies
5352 run : " [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
54- - name : Cache Restore
55- id : cache-restore
56- uses : actions/cache/restore@v4
57- with :
58- path : |
59- ${{ runner.temp }}/hugo_cache
60- key : hugo-${{ github.run_id }}
61- restore-keys :
62- hugo-
6353 - name : Build with Hugo
54+ env :
55+ # For maximum backward compatibility with Hugo modules
56+ HUGO_ENVIRONMENT : production
57+ HUGO_ENV : production
6458 run : |
6559 hugo \
6660 --gc \
6761 --minify \
68- --baseURL "${{ steps.pages.outputs.base_url }}/" \
69- --cacheDir "${{ runner.temp }}/hugo_cache"
70- - name : Cache Save
71- id : cache-save
72- uses : actions/cache/save@v4
73- with :
74- path : |
75- ${{ runner.temp }}/hugo_cache
76- key : ${{ steps.cache-restore.outputs.cache-primary-key }}
62+ --baseURL "${{ steps.pages.outputs.base_url }}/"
7763 - name : Upload artifact
78- uses : actions/upload-pages-artifact@v3
64+ uses : actions/upload-pages-artifact@v1
7965 with :
8066 path : ./public
8167
8975 steps :
9076 - name : Deploy to GitHub Pages
9177 id : deployment
92- uses : actions/deploy-pages@v4
78+ uses : actions/deploy-pages@v2
0 commit comments