-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.42 KB
/
hugo-add-theme.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Hugo - Add Theme
# Original source: htts://github.com/boochtek/hugo-add-theme
# Original author: Craig Buchek (@booch) with help from ChatGPT.
on:
# Run this workflow manually from the Actions tab.
workflow_dispatch:
inputs:
theme_url:
description: "URL of the theme to add"
required: true
type: string
permissions:
contents: write
defaults:
run:
shell: bash
jobs:
gugo-add-theme:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.120.2
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Add git submodule pointing at the theme
run: |
THEME_URL="${{ inputs.theme_url }}"
THEME_NAME="$(basename ${THEME_URL%.*})"
git submodule add "$THEME_URL" "themes/${THEME_NAME}"
git submodule update --init --recursive
- name: Add theme to config # TODO
run: |
echo "OK"