This commit is contained in:
Jean-Marie Mineau 2024-03-27 14:49:04 +01:00
commit 62f99b8a6f
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
7 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,33 @@
on: [push]
jobs:
test_checkout:
runs-on: debian
steps:
- run: apt-get update -y && apt-get install -y git curl
- run: |
curl -L -O https://github.com/gohugoio/hugo/releases/download/v0.124.1/hugo_extended_0.124.1_linux-amd64.deb
dpkg -i ./hugo_extended_0.124.1_linux-amd64.deb
- run: |
TOKEN=$(echo -n "x-access-token:${GITHUB_TOKEN}" | base64)
mkdir -p "${GITHUB_WORKSPACE}"
cd "${GITHUB_WORKSPACE}"
git init
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
git -c http.extraHeader="Authorization: Basic ${TOKEN}" fetch origin "${GITHUB_SHA}"
git checkout "${GITHUB_SHA}"
git submodule update --init --recursive
- run: |
cd "${GITHUB_WORKSPACE}"
hugo
- run: |
cd dist
git init
git config user.email "ci_action@example.com"
git config user.name "CI"
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
TOKEN=$(echo -n "x-access-token:${GITHUB_TOKEN}" | base64)
git -c http.extraHeader="Authorization: Basic ${TOKEN}" push origin -d pages || true
git checkout -b pages
git add *
git commit -m "gen pages"
git -c http.extraHeader="Authorization: Basic ${TOKEN}" push -u origin pages

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "themes/ananke"]
path = themes/ananke
url = https://github.com/theNewDynamic/gohugo-theme-ananke.git

0
.hugo_build.lock Normal file
View file

5
archetypes/default.md Normal file
View file

@ -0,0 +1,5 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++

11
content/posts/test.md Normal file
View file

@ -0,0 +1,11 @@
+++
title = 'Test'
date = 2024-03-27T13:45:31Z
draft = true
+++
## Test
Lorem **ipsum** dolor, *sit* amet.
Visit the [git page](https://git.mineau.eu/histausse/tst_hugo_action).

4
hugo.toml Normal file
View file

@ -0,0 +1,4 @@
baseURL = 'https://histausse.page.mineau.eu/tst_hugo_action/'
languageCode = 'en-us'
title = 'My New Hugo Site'
theme = 'ananke'

1
themes/ananke Submodule

@ -0,0 +1 @@
Subproject commit 91df000ca82769a7578df81fa142d1a18e446bc0