update build-and-deploy pipeline with explicit dependency versions
Some checks failed
Build and Deploy Hugo Site / buildAndDeploy (push) Failing after 15s
Some checks failed
Build and Deploy Hugo Site / buildAndDeploy (push) Failing after 15s
This commit is contained in:
parent
90c1d20201
commit
b6c7c07c49
1 changed files with 23 additions and 12 deletions
|
|
@ -5,6 +5,11 @@ on:
|
|||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
HUGO_VERSION: '0.121.2'
|
||||
GO_VERSION: '1.20.5'
|
||||
NODE_VERSION: '20.0.0'
|
||||
|
||||
jobs:
|
||||
buildAndDeploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -21,10 +26,13 @@ jobs:
|
|||
- name: Echo environment
|
||||
run: echo "Environment is ${{ steps.read_toml.outputs.value }}"
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5.0.0
|
||||
with:
|
||||
go-version: '1.20.5'
|
||||
- name: Install Go
|
||||
run: |
|
||||
curl -LO "https://dl.google.com/go/go${{ env.GO_VERSION }}.linux-amd64.tar.gz"
|
||||
sudo tar -C /usr/local -xzf go${{ env.GO_VERSION }}.linux-amd64.tar.gz
|
||||
echo "export PATH=$PATH:/usr/local/go/bin" >> $GITHUB_ENV
|
||||
rm go${{ env.GO_VERSION }}.linux-amd64.tar.gz
|
||||
go version
|
||||
|
||||
- name: Cache Go modules
|
||||
uses: actions/cache@v3
|
||||
|
|
@ -40,6 +48,9 @@ jobs:
|
|||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Cache Node modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
|
@ -48,16 +59,16 @@ jobs:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
|
||||
- name: Install PostCSS
|
||||
- name: Install Hugo
|
||||
run: |
|
||||
npm install -g postcss postcss-cli
|
||||
npm install autoprefixer
|
||||
curl -LO "https://github.com/gohugoio/hugo/releases/download/v${{ env.HUGO_VERSION }}/hugo_extended_${{ env.HUGO_VERSION }}_Linux-64bit.tar.gz"
|
||||
tar -xvf hugo_extended_${{ env.HUGO_VERSION }}_Linux-64bit.tar.gz
|
||||
sudo mv hugo /usr/local/bin/
|
||||
rm hugo_extended_${{ env.HUGO_VERSION }}_Linux-64bit.tar.gz
|
||||
hugo version
|
||||
|
||||
- name: Set up Hugo Extended
|
||||
uses: peaceiris/actions-hugo@v3.0.0
|
||||
with:
|
||||
hugo-version: '0.121.2'
|
||||
extended: true
|
||||
- name: Setup Project
|
||||
run: npm run project-setup
|
||||
|
||||
- name: Build Hugo site
|
||||
run: hugo --minify
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue