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

hugo: vendor modules before building page #7

Merged
merged 1 commit into from
Jan 22, 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
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ concurrency:

env:
HUGO_CACHEDIR: /tmp/hugo_cache/
HUGO_BASE_URL: "https://botlabs.gg.github.io/yagpdb-docs-v2"

jobs:
build:
Expand Down Expand Up @@ -45,7 +46,7 @@ jobs:
- name: Build website
# See https://discourse.gohugo.io/t/solved-what-should-be-used-for-the-value-of-site-baseurl/5896
# for why we set baseURL here and not in hugo.toml.
run: hugo --noChmod --minify --baseURL="https://botlabs-gg.github.io/yagpdb-docs-v2"
run: hugo mod vendor && hugo --minify --baseURL=${{ env.HUGO_BASE_URL }}

- name: Setup Pages
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ As always clone the repository first and change into it.
Install [Hugo](https://gohugo.io/getting-started/installing/), clone this repository and run `hugo server` to start a
local server. The server will automatically rebuild the page when you make changes.

To build the page in release mode:

1. `hugo mod vendor`
2. `hugo`

Then serve the generated `public/` directory with the webserver of your choice. Adjust the `--baseURL` argument to
`hugo` as required.

### Editor Setup

As this project used the [EditorConfig](https://editorconfig.org/) standard, you will have to make sure that your
Expand Down
Loading