Skip to content

Commit

Permalink
chore: update documentation workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
smlx committed Mar 8, 2024
1 parent 3c4e251 commit 16b6638
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/user-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,18 @@ jobs:
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- uses: actions/checkout@v4
with:
repository: google/docsy
path: docs/themes/docsy
submodules: true

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.123.8'
extended: true

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '16'

- run: cd docs && npm install postcss postcss-cli autoprefixer

- run: cd docs/themes/docsy && npm install
node-version: 20

- run: cd docs && hugo --minify
- run: cd docs && npm install postcss-cli autoprefixer && hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand Down
7 changes: 7 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ serve:
docker run --rm -it -v $$(pwd):/src -v $$HOME/.cache/hugo_cache:/home/node/.cache/hugo_cache -u $$(id -u) -p 1313:1313 \
--entrypoint sh hugomods/hugo:latest -c \
"cd docs && hugo server --baseURL=/ --bind 0.0.0.0"

.PHONY: minify
minify:
cd .. && \
docker run --rm -it -v $$(pwd):/src -v $$HOME/.cache/hugo_cache:/home/node/.cache/hugo_cache -u $$(id -u)\
--entrypoint sh hugomods/hugo:latest -c \
"cd docs && npm install postcss-cli autoprefixer && hugo --minify"

0 comments on commit 16b6638

Please sign in to comment.