Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix hugo base url #10

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,9 @@ $RECYCLE.BIN/

/repos/perses

/content/**/*.md
!/content/**/_index.md
/website/content/**/*.md
!/website/content/**/_index.md

/website/content/docs/perses/_index.md
/website/content/docs/prologue/_index.md
/website/static/images
14 changes: 7 additions & 7 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: '3.9'
version: "3.9"

services:
website:
build:
context: .
dockerfile: ./website/Dockerfile
args:
- HUGO_BASEURL=https://perses.dev
image: hugomods/hugo
command: hugo server --watch --bind=0.0.0.0 --disableLiveReload=true --minify -environment production --baseURL https://perses.dev --appendPort=false

Check failure on line 6 in docker-compose.yaml

View workflow job for this annotation

GitHub Actions / validate-yaml

6:81 [line-length] line too long (153 > 80 characters)
restart: unless-stopped
ports:
- "5001:80"
- 1313:1313
volumes:
- ./website:/src
Copy link
Member

Choose a reason for hiding this comment

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

does that mean we need to run on the server the script synchronize.sh ? And if so we should probably add to ignore file every file generated if it's not done already

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll double check it, but I guess I already ignore it.

Copy link
Member

Choose a reason for hiding this comment

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

based on what you did directly on the server, it looks like it's not ignored :

$ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   docker-compose.yaml
	modified:   scripts/synchronize.sh

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	docker-compose.old
	package-lock.json
	website/.hugo_build.lock
	website/content/docs/perses/
	website/content/docs/prologue/
	website/resources/_gen/assets/
	website/static/images/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Nexucis added can you check?

labels:
- "traefik.enable=true"
# The domain the service will respond to
Expand Down
5 changes: 2 additions & 3 deletions scripts/synchronize.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

ROOT_DIR=$(pwd)
TAG_FILTER_RE="v(0|[1-9]\d*)\.([1-9]\d*).0"
GREP=$(which ggrep 2>/dev/null || which grep)
BASE_OUTPUT_DIR=$ROOT_DIR/website/content/docs
REPOS_DIR=$ROOT_DIR/repos
Expand Down Expand Up @@ -38,7 +37,7 @@ cd $PERSES_REPO_DIR
git fetch --tags

## Get all the tags that match the filter
RELEASE_TAGS=$(git tag --list | $GREP -E "${TAG_FILTER_RE}" | sort -V)
RELEASE_TAGS=$(git tag --list | grep -E 'v([0-9]+)\.([0-9]+)\.0' | grep -v -E 'v([0-9]+)\.([0-9]+)\.0-rc[0-9]+' | sort -V)

## Starting processing perses docs using mdox
##
Expand Down Expand Up @@ -101,7 +100,7 @@ TEMP_RELEASE_DIR="$TMP_DOCS_DIR/${release_tag}"
mkdir -p $TEMP_RELEASE_DIR

# Extract the archive
tar -xjvf $TMP_DOCS_DIR/${release_tag}.tar.gz -C $TEMP_RELEASE_DIR
tar -xzf $TMP_DOCS_DIR/${release_tag}.tar.gz -C $TEMP_RELEASE_DIR

export INPUT_CONTENT_DIR=$TEMP_RELEASE_DIR/docs
export OUTPUT_CONTENT_DIR=$BASE_OUTPUT_DIR/perses/${release_tag}
Expand Down
Loading