Skip to content

Commit

Permalink
More elegant public dir. (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan authored Aug 8, 2023
1 parent 4494f8a commit 60aa8a7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: public/html
path: public
- id: deployment
name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ package:
pages:
artifacts:
paths:
- public/html
- public
except:
refs:
- schedules
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ package:
pages:
artifacts:
paths:
- public/html
- public
except:
refs:
- schedules
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Construct pipenv run command with or without site-packages flag when not in CI environment and pipenv command exists.
SITE_PACKAGES_FLAG = $(shell [ "${SS_SITE_PACKAGES}" = "true" ] && echo --site-packages)
PIPRUN := $(shell [ "${CI}" != "true" ] && command -v pipenv > /dev/null 2>&1 && echo pipenv ${SITE_PACKAGES_FLAG} run)
PUBLIC_DIR := $(or $(READTHEDOCS_OUTPUT),public)
PUBLIC_DIR := $(if $(READTHEDOCS_OUTPUT),$(READTHEDOCS_OUTPUT)/html,public)

# Remove common intermediate files.
clean:
Expand Down Expand Up @@ -73,9 +73,9 @@ upload:
${PIPRUN} python -m twine upload dist/*

docs:
${PIPRUN} python -m sphinx.cmd.build docs ${PUBLIC_DIR}/html
${PIPRUN} python -m mypy tests src --html-report ${PUBLIC_DIR}/html/reports/mypy
${PIPRUN} python -m pytest --cov-report html:${PUBLIC_DIR}/html/reports/coverage .
${PIPRUN} python -m sphinx.cmd.build docs ${PUBLIC_DIR}
${PIPRUN} python -m mypy tests src --html-report ${PUBLIC_DIR}/reports/mypy
${PIPRUN} python -m pytest --cov-report html:${PUBLIC_DIR}/reports/coverage .

docs-autobuild:
${PIPRUN} python -m sphinx_autobuild docs ${PUBLIC_DIR}/html --watch src
${PIPRUN} python -m sphinx_autobuild docs ${PUBLIC_DIR} --watch src
10 changes: 5 additions & 5 deletions Makefile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Construct pipenv run command with or without site-packages flag when not in CI environment and pipenv command exists.
SITE_PACKAGES_FLAG = $(shell [ "${SS_SITE_PACKAGES}" = "true" ] && echo --site-packages)
PIPRUN := $(shell [ "${CI}" != "true" ] && command -v pipenv > /dev/null 2>&1 && echo pipenv ${SITE_PACKAGES_FLAG} run)
PUBLIC_DIR := $(or $(READTHEDOCS_OUTPUT),public)
PUBLIC_DIR := $(if $(READTHEDOCS_OUTPUT),$(READTHEDOCS_OUTPUT)/html,public)

# Remove common intermediate files.
clean:
Expand Down Expand Up @@ -75,9 +75,9 @@ upload:
${PIPRUN} python -m twine upload dist/*

docs:
${PIPRUN} python -m sphinx.cmd.build docs ${PUBLIC_DIR}/html
${PIPRUN} python -m mypy tests src --html-report ${PUBLIC_DIR}/html/reports/mypy
${PIPRUN} python -m pytest --cov-report html:${PUBLIC_DIR}/html/reports/coverage .
${PIPRUN} python -m sphinx.cmd.build docs ${PUBLIC_DIR}
${PIPRUN} python -m mypy tests src --html-report ${PUBLIC_DIR}/reports/mypy
${PIPRUN} python -m pytest --cov-report html:${PUBLIC_DIR}/reports/coverage .

docs-autobuild:
${PIPRUN} python -m sphinx_autobuild docs ${PUBLIC_DIR}/html --watch src
${PIPRUN} python -m sphinx_autobuild docs ${PUBLIC_DIR} --watch src

0 comments on commit 60aa8a7

Please sign in to comment.