Update GitHub workflow: Hugo installed via action
This commit is contained in:
parent
c0dde83f58
commit
e3deae000c
1 changed files with 5 additions and 15 deletions
20
.github/workflows/main.yml
vendored
20
.github/workflows/main.yml
vendored
|
|
@ -1,42 +1,34 @@
|
||||||
# Sample workflow for building and deploying a Hugo site to GitHub Pages
|
|
||||||
name: Deploy Hugo site to Pages
|
name: Deploy Hugo site to Pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Runs on pushes targeting the default branch
|
|
||||||
push:
|
push:
|
||||||
branches: ["master"]
|
branches: ["master"]
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pages: write
|
pages: write
|
||||||
id-token: write
|
id-token: write
|
||||||
|
|
||||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
|
||||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: "pages"
|
group: "pages"
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
# Default to bash
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Build job
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
HUGO_VERSION: 0.120.4
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Hugo CLI
|
- name: Setup Hugo
|
||||||
run: |
|
uses: peaceiris/actions-hugo@v3
|
||||||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
|
with:
|
||||||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
|
hugo-version: 'latest'
|
||||||
|
# extended: true
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -46,7 +38,6 @@ jobs:
|
||||||
uses: actions/configure-pages@v4
|
uses: actions/configure-pages@v4
|
||||||
- name: Build with Hugo
|
- name: Build with Hugo
|
||||||
env:
|
env:
|
||||||
# For maximum backward compatibility with Hugo modules
|
|
||||||
HUGO_ENVIRONMENT: production
|
HUGO_ENVIRONMENT: production
|
||||||
HUGO_ENV: production
|
HUGO_ENV: production
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -66,7 +57,6 @@ jobs:
|
||||||
local-dir: ./public/
|
local-dir: ./public/
|
||||||
server-dir: jankremer.eu/public_www/
|
server-dir: jankremer.eu/public_www/
|
||||||
|
|
||||||
# Deployment job
|
|
||||||
deploy:
|
deploy:
|
||||||
environment:
|
environment:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue