Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c5fb6d8
Update `README.md` due to the site build on Hugo
JuliaEvseeva Dec 12, 2025
76b046e
Update the site run and build commands
JuliaEvseeva Dec 12, 2025
76badb8
Prepare the release script
JuliaEvseeva Dec 12, 2025
dbf3516
Add a note about Java version to build samples
JuliaEvseeva Dec 15, 2025
379fca0
Test the GitHub Action locally
JuliaEvseeva Dec 15, 2025
98ba306
Merge remote-tracking branch 'origin/migration-to-hugo' into update-r…
JuliaEvseeva Dec 15, 2025
07ede4e
Merge branch 'delete-jekyll' into update-readme
JuliaEvseeva Dec 15, 2025
f8c5bfd
Update the build settings due to the structure update
JuliaEvseeva Dec 15, 2025
1bdcc4d
Enable `robots.txt` for production
JuliaEvseeva Dec 15, 2025
3b441d5
Improve the guide about how to edit content in Hugo
JuliaEvseeva Dec 15, 2025
d7988d0
Configure the link checker
JuliaEvseeva Dec 15, 2025
8dc170f
Add the source content link to ignore
JuliaEvseeva Dec 15, 2025
1229fa0
Add theme updates with the fixed links
JuliaEvseeva Dec 15, 2025
1eef12c
Disable the test rule
JuliaEvseeva Dec 15, 2025
bdf8ae9
Remove the link to the previously used repository
JuliaEvseeva Dec 15, 2025
bf122dc
Get documentation updates
JuliaEvseeva Dec 15, 2025
0d5b8c4
Configure Lychee to test the site locally
JuliaEvseeva Dec 15, 2025
b2b672b
Rename `check-links` action to `proof-links` to be corresponding with…
JuliaEvseeva Dec 16, 2025
cee3d17
Move `gitignore` to the root
JuliaEvseeva Dec 16, 2025
3298a1a
Make the current year in the release notes automatically opened
JuliaEvseeva Dec 16, 2025
39c4c64
Clean up `README`
JuliaEvseeva Dec 16, 2025
3c0457a
Check code samples in the `documentation` repository
JuliaEvseeva Dec 16, 2025
c308e2a
Remove the `_docs` submodule with Jekyll implementation
JuliaEvseeva Dec 16, 2025
0a53609
Clean up
JuliaEvseeva Dec 16, 2025
7e93ae3
Change the theme GH user
JuliaEvseeva Dec 16, 2025
253824a
Remove the `samples` that are now configured in `documentation`
JuliaEvseeva Dec 16, 2025
70af64f
Improve `README`
JuliaEvseeva Dec 16, 2025
cce4c8a
Update credentials for `proof-links`
JuliaEvseeva Dec 16, 2025
2282745
Do not install Lychee with `npm`
JuliaEvseeva Dec 17, 2025
a9d76fe
Remove the `config` submodule until it is needed to build the samples…
JuliaEvseeva Dec 17, 2025
4da7e37
Clean up
JuliaEvseeva Dec 17, 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
50 changes: 0 additions & 50 deletions .github/workflows/check-code-embedding.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- master

env:
HUGO_VERSION: 0.147.8
GH_USER: site-commons-machine-user

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_SITE_COMMONS_PAT }}
submodules: true
fetch-depth: 0

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: ${{ env.HUGO_VERSION }}
extended: true

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Cache Hugo Modules
uses: actions/cache@v4
with:
path: /tmp/hugo_cache
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-hugomod-

- name: Prepare Environment
run: git config --global url."https://${{ env.GH_USER }}:${{ secrets.GH_SITE_COMMONS_PAT }}@github.com".insteadOf "https://github.com"

- name: Install Dependencies
working-directory: site
run: npm ci

- name: Build Spine
working-directory: site
run: hugo --minify

- name: Deploy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I don't understand the idea. As we discussed vocally, this site is deployed in a "classic" way. I.e. by pushing the content to master.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, I've added this information to the pull request description.
The “classic” way by pushing the content to master will work for Jekyll implementation, but not for Hugo. Here the script builds the site and placed it in the gh-pages branch.

uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./site/public
126 changes: 101 additions & 25 deletions .github/workflows/proof-links.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,113 @@
name: Proof Links
on: [pull_request, workflow_dispatch]

on:
push:
branches:
- master
pull_request:
branches:
- master
env:
HUGO_VERSION: 0.147.8
GH_USER: site-commons-machine-user
LYCHEE_RELEASE: "lychee-v0.15.1-x86_64-unknown-linux-gnu.tar.gz"
LYCHEE_VERSION_TAG: "v0.15.1"

jobs:
proof-links:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: ${{ env.HUGO_VERSION }}
extended: true

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Cache Hugo Modules
uses: actions/cache@v4
with:
path: /tmp/hugo_cache
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-hugomod-

- name: Prepare environment
run: git config --global url."https://${{ env.GH_USER }}:${{ secrets.GH_SITE_COMMONS_PAT }}@github.com".insteadOf "https://github.com"

- name: Install Dependencies
working-directory: site
run: npm ci

- name: Build Spine
working-directory: site
run: hugo -e development

# Cache Lychee results to avoid hitting rate limits.
- name: Cache Lychee results
uses: actions/cache@v4
with:
submodules: 'recursive'
path: .lycheecache
key: cache-lychee-results

- name: Set up Ruby and Bundler
uses: ruby/setup-ruby@v1
- name: Cache Lychee executable
id: cache-lychee
uses: actions/cache@v4
with:
ruby-version: '2.7.4'

# Bundler version is restricted to `2.4.22`,
# as we want to use Ruby `2.7.4` to match GH Pages environment.
#
# Any newer versions of Bundler require Ruby 3.x,
# which are much newer than what's GH Pages has at the moment.
#
- name: Run Jekyll build
path: lychee
key: ${{ runner.os }}-${{ env.LYCHEE_RELEASE }}

# We use Lychee directly instead of a GitHub Action because it
# must have access the local Hugo server, which is not visible
# from the Docker-based action.
- name: Download Lychee executable
uses: robinraju/release-downloader@v1.7
if: steps.cache-lychee.outputs.cache-hit != 'true'
with:
repository: "lycheeverse/lychee"
tag: ${{ env.LYCHEE_VERSION_TAG }}
fileName: ${{ env.LYCHEE_RELEASE }}

- name: Extract Lychee executable
if: steps.cache-lychee.outputs.cache-hit != 'true'
run: |
gem install bundler -v 2.4.22
bundle install
bundle exec jekyll build
mkdir -p lychee &&
tar -xf ${{ env.LYCHEE_RELEASE }} -C lychee

- name: Proof Links
run: ./_script/proof-links
# 1. In the generated HTML, some inner links will have absolute URLs and
# the link checker will attempt to fetch them. That's why we need
# a server. Sadly, link checkers have no settings to address this.
# 2. Output redirection is necessary for nohup in GitHub Actions.
# 3. Sleep makes sure the server is up before the next step.
- name: Start Hugo server
working-directory: site
run: |
nohup hugo server \
--environment development \
> nohup.out 2> nohup.err < /dev/null &
sleep 5

- name: Check if the cache file exists
run: |
if [ -f ".lycheecache" ]; then
echo "Lychee cache exists."
else
echo "No lychee cache file."
fi

- name: Check links
run: |
./lychee/lychee --config lychee.toml --timeout 60 \
--base http://localhost:1313/ \
'site/public/**/*.html'
27 changes: 15 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# The result of Jekyll build
_site/
# Hugo cache files
/site/resources
public

# Intermediate directory used by `embed-code` Jekyll subcommand
.fragments
# Cache folder for Hugo Modules
/site/_vendor

.sass-cache
.jekyll-metadata
.DS_Store
# Node modules
node_modules

*/build/
# Used to control concurrency between multiple Hugo instances
/site/.hugo_build.lock

**/*.jar
# Needed for navigation help inside code editors
jsconfig.json

# Do not ignore the Gradle Wrapper at the top level and in the sub-projects that are
# added as included builds. See `settings.gradle.kts` for details.
!**/gradle/wrapper/*
# The temporary Lychee cache obtained from local check
.lycheecache

# IntelliJ IDEA modules and interim config files
*.iml
Expand All @@ -29,6 +30,8 @@ _site/
!.idea/codeStyles/
!.idea/copyright/

.DS_Store

# Gradle interim configs
.gradle/

Expand Down
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@
[submodule "_code/examples/todo-list"]
path = _code/examples/todo-list
url = https://github.com/spine-examples/todo-list
[submodule "_code/config"]
path = config
url = https://github.com/SpineEventEngine/config
[submodule "_docs"]
path = _docs
url = https://github.com/SpineEventEngine/documentation.git
Loading