Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3af90d6
chores: remove duplicate config
mspiekermann Oct 30, 2025
70b336c
remove npm deployment and use docker for dev and live
mspiekermann Oct 30, 2025
3f97614
remove netlify references
mspiekermann Oct 30, 2025
0cce9f3
update go.mod and go.sum
mspiekermann Oct 30, 2025
628086d
update GH Action
mspiekermann Oct 30, 2025
77ee5de
update GH Action
mspiekermann Oct 30, 2025
c71d124
add missing user option in GH Action
mspiekermann Oct 30, 2025
34f5abe
install tar through docker as required by GH Action
mspiekermann Oct 30, 2025
e8c3ae5
update GH workflow to add tar
mspiekermann Oct 30, 2025
e3ab9c0
add postcss in workflow
mspiekermann Oct 30, 2025
f446459
add postcss in workflow
mspiekermann Oct 30, 2025
7aa213e
check canonifyURLs = true
mspiekermann Oct 30, 2025
31a5b0b
rm double run in workflow
mspiekermann Oct 30, 2025
c00908d
add baseURL in workflow
mspiekermann Oct 30, 2025
c07a348
add baseURL in workflow
mspiekermann Oct 30, 2025
889cbd3
change fix URL in hugo.toml
mspiekermann Oct 30, 2025
b566046
fix workflow for flexible repos
mspiekermann Oct 30, 2025
069bd5c
chores: revert workflow name
mspiekermann Oct 30, 2025
ae2588e
rm unnecessary scripts attribute in package.json
mspiekermann Oct 31, 2025
bf067b6
fix: incorporate feedback docker compose and gomod
mspiekermann Oct 31, 2025
a7fc085
rm install git in Dockerfile
mspiekermann Oct 31, 2025
7ca01e7
clean workflow on dependencies install
mspiekermann Oct 31, 2025
e7aa47e
fix literal block in workflow file
mspiekermann Oct 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 48 additions & 39 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,68 @@ name: publish

on:
push:
branches:
- main
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: github-pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
# Run all steps inside the Hugo + Node container
container:
image: floryn90/hugo:ext-alpine
options: --user 0
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- uses: actions/setup-node@v4
- run: npm i -D postcss postcss-cli autoprefixer
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.134.1"
extended: true
- name: Checkout
uses: actions/checkout@v4

- name: Build
run: hugo --minify
# Computes the correct base URL
- name: Configure Pages
id: pages
uses: actions/configure-pages@v5

- name: Archive artifact
shell: sh
# BusyBox tar in Alpine doesn't support --hard-dereference; install GNU tar
- name: Install tar
run: |
echo ::group::Archive artifact
tar \
--dereference --hard-dereference \
--directory "public" \
-cvf "$RUNNER_TEMP/artifact.tar" \
--exclude=.git \
--exclude=.github \
.
echo ::endgroup::
- uses: actions/upload-artifact@v4
apk add --no-cache tar
git config --global --add safe.directory "$GITHUB_WORKSPACE"

# Cache Hugo's module/remote cache
- name: Cache Hugo modules
uses: actions/cache@v4
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
retention-days: 1
if-no-files-found: error
path: /root/.cache/hugo
key: ${{ runner.os }}-hugo-${{ hashFiles('**/go.mod', '**/go.sum') }}
restore-keys: ${{ runner.os }}-hugo-

publish:
- name: Build site
env:
HUGO_BASEURL: ${{ steps.pages.outputs.base_url }}
run: hugo --gc --minify

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public

deploy:
# Deploy only for main branch pushes (skip PRs)
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- id: deployment
uses: actions/deploy-pages@v4
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
FROM floryn90/hugo:ext-alpine

# Ensure we are root while installing system packages so apk can lock/update its DB
USER root
RUN apk add --no-cache git && \
git config --global --add safe.directory /src
RUN git config --global --add safe.directory /src

# (Optional) drop back to a non-root user if the base image expects one.
# You can uncomment and adjust the USER line below if you know the non-root username.
# USER hugo
WORKDIR /src
CMD ["server", "--bind", "0.0.0.0", "-D", "--ignoreCache"]
15 changes: 0 additions & 15 deletions config.yaml

This file was deleted.

11 changes: 5 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
services:

site:
image: eclipse-edc/eclipse-edc.github.io
web:
build:
context: .
command: server
ports:
- "1313:1313"
volumes:
- .:/src
ports:
- "1313:1313"
environment:
HUGO_CACHEDIR: /tmp/hugo-cache
5 changes: 0 additions & 5 deletions docsy.work

This file was deleted.

Empty file removed docsy.work.sum
Empty file.
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module github.com/google/docsy-example
module github.com/eclipse-edc/eclipse-edc.github.io
go 1.22

go 1.12
require (
github.com/google/docsy v0.12.0
)

require github.com/google/docsy v0.10.0 // indirect
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.10.0 h1:6tMDacPwAyRWNCfvsn/9qGOZDQ8b0aRzjRZvnZPY5dg=
github.com/google/docsy v0.10.0/go.mod h1:c0nIAqmRTOuJ01F85U/wJPQtc3Zj9N58Kea9bOT2AJc=
github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.12.0 h1:CddZKL39YyJzawr8GTVaakvcUTCJRAAYdz7W0qfZ2P4=
github.com/google/docsy v0.12.0/go.mod h1:1bioDqA493neyFesaTvQ9reV0V2vYy+xUAnlnz7+miM=
github.com/twbs/bootstrap v5.3.6+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
2 changes: 2 additions & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Basic page settings
baseURL = "https://eclipse-edc.github.io/"
canonifyURLs = true
title = "EDC"

# Language settings
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/_markup/render-heading.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ template "_default/_markup/td-render-heading.html" . }}
{{- partial "td/render-heading.html" . -}}
12 changes: 0 additions & 12 deletions netlify.toml

This file was deleted.

44 changes: 4 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,6 @@
{
"name": "docsy-example-site",
"version": "0.10.0",
"version.next": "0.10.1-dev.0-unreleased",
"description": "Example site that uses Docsy theme for technical documentation.",
"repository": "github:google/docsy-example",
"homepage": "https://example.docsy.dev",
"author": "Docsy Authors",
"license": "Apache-2.0",
"bugs": "https://github.com/google/docsy-example/issues",
"spelling": "cSpell:ignore HTMLTEST precheck postbuild -",
"scripts": {
"_build": "npm run _hugo-dev --",
"_check:links": "echo IMPLEMENTATION PENDING for check-links; echo",
"_hugo": "hugo --cleanDestinationDir",
"_hugo-dev": "npm run _hugo -- -e dev -DFE",
"_local": "npx cross-env HUGO_MODULE_WORKSPACE=docsy.work",
"_serve": "npm run _hugo-dev -- --minify serve",
"build:preview": "npm run _hugo-dev -- --minify --baseURL \"${DEPLOY_PRIME_URL:-/}\"",
"build:production": "npm run _hugo -- --minify",
"build": "npm run _build -- ",
"check:links:all": "HTMLTEST_ARGS= npm run _check:links",
"check:links": "npm run _check:links",
"clean": "rm -Rf public/* resources",
"local": "npm run _local -- npm run",
"make:public": "git init -b main public",
"precheck:links:all": "npm run build",
"precheck:links": "npm run build",
"postbuild:preview": "npm run _check:links",
"postbuild:production": "npm run _check:links",
"serve": "npm run _serve",
"test": "npm run check:links",
"update:pkg:dep": "npm install --save-dev autoprefixer@latest postcss-cli@latest",
"update:pkg:hugo": "npm install --save-dev --save-exact hugo-extended@latest"
},
"devDependencies": {
"autoprefixer": "^10.4.14",
"cross-env": "^10.0.0",
"hugo-extended": "0.152.2",
"postcss-cli": "^11.0.0"
}
"name": "eclipse-edc-website",
"version": "0.14.0",
"private": true,
"description": "Eclipse EDC website built with Hugo and Docsy, deployed via Docker and GitHub Pages."
}
Loading