Update workflow actions versions and add caching for Go, Node.js, and Hugo modules.
Some checks failed
Build Hugo Site / build (push) Failing after 2m8s
Some checks failed
Build Hugo Site / build (push) Failing after 2m8s
This commit is contained in:
parent
1c0d227124
commit
79d55bb7bd
1 changed files with 32 additions and 5 deletions
|
|
@ -10,17 +10,34 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2.4.0
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v5.0.0
|
||||||
with:
|
with:
|
||||||
go-version: '1.20.5'
|
go-version: '1.20.5'
|
||||||
|
|
||||||
|
- name: Cache Go modules
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
cache: 'npm' # caching npm dependencies
|
||||||
|
|
||||||
|
- name: Cache Node modules
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
|
||||||
- name: Install PostCSS
|
- name: Install PostCSS
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -28,11 +45,21 @@ jobs:
|
||||||
npm install autoprefixer
|
npm install autoprefixer
|
||||||
|
|
||||||
- name: Set up Hugo Extended
|
- name: Set up Hugo Extended
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3.0.0
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.121.2'
|
hugo-version: '0.121.2'
|
||||||
extended: true # Specify to use Hugo Extended version
|
extended: true # Specify to use Hugo Extended version
|
||||||
|
|
||||||
|
- name: Cache Hugo modules
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
resources
|
||||||
|
public
|
||||||
|
key: ${{ runner.os }}-hugo-${{ hashFiles('**/go.sum', '**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-hugo-
|
||||||
|
|
||||||
- name: Build Hugo site
|
- name: Build Hugo site
|
||||||
run: hugo --minify
|
run: hugo --minify
|
||||||
|
|
||||||
|
|
@ -43,5 +70,5 @@ jobs:
|
||||||
server: ${{ secrets.FTP_SERVER }}
|
server: ${{ secrets.FTP_SERVER }}
|
||||||
username: ${{ secrets.FTP_USERNAME }}
|
username: ${{ secrets.FTP_USERNAME }}
|
||||||
password: ${{ secrets.FTP_PASSWORD }}
|
password: ${{ secrets.FTP_PASSWORD }}
|
||||||
local-dir: public
|
local-dir: 'public/'
|
||||||
server-dir: '/'
|
server-dir: '/'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue