diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e37b81fd11..e0e2a2738f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -340,9 +340,9 @@ jobs:
hugo --minify
gh-pages:
- if: ${{ github.ref == 'refs/heads/main' }}
+ # if: ${{ github.ref == 'refs/heads/main' }}
needs:
- - audit
+ # - audit
- book
- careful
- check
@@ -354,7 +354,7 @@ jobs:
- miri
- test
# - udeps
- - upgrades
+ # - upgrades
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -375,11 +375,7 @@ jobs:
hugo-version: 'latest'
extended: true
- run: |
- mkdir -p target/docs
- cargo doc --all --no-deps --workspace --target-dir target/docs/api
- hugo --minify --gc --source docs --destination ../target/docs/book
- echo 'Redirect' >> target/docs/api/index.html
- echo 'Redirect' >> target/docs/index.html
+ make docs
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/Makefile b/Makefile
index 038258da19..0bc20632ee 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ MAKEFLAGS += -rR
DESTDIR=
CARGO ?= cargo
+HUGO ?= hugo
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
@@ -29,6 +30,15 @@ fmt:
doc:
$(CARGO) doc --no-deps
+docs:
+ mkdir -p target/docs
+ $(CARGO) doc --all --no-deps --workspace --target-dir target/docs/api
+ $(HUGO) --minify --gc --source docs --destination ../target/docs/book
+ echo 'Redirect' \
+ > target/docs/api/index.html
+ echo 'Redirect' \
+ > target/docs/index.html
+
release:
$(CARGO) build --workspace --all-features --release
$(CARGO) test --workspace --all-features --release
@@ -39,4 +49,4 @@ install: release
clean:
$(CARGO) clean
-.PHONY: build clean check clippy test fmt doc release install
+.PHONY: build clean check clippy test fmt doc docs release install