2021-01-09 16:11:30 +00:00
|
|
|
---
|
|
|
|
### develop
|
|
|
|
# ## Developing
|
|
|
|
#
|
|
|
|
# You can clone the repository with
|
|
|
|
# ```
|
|
|
|
# git clone https://code.studioinfinity.org/glen/mkdocs-semiliterate
|
|
|
|
# ```
|
2024-09-15 18:49:57 +00:00
|
|
|
#
|
|
|
|
# For the remaining steps, it may be easiest to do them in a python
|
|
|
|
# virtual environment. If you put the virtual environment in `.venv` at
|
|
|
|
# the top level of the project, it will not disrupt any of the tests.
|
|
|
|
# Remember to activate your virtual environment before doing the testing.
|
2021-01-09 16:11:30 +00:00
|
|
|
###
|
|
|
|
kind: pipeline
|
|
|
|
name: bootstrap
|
|
|
|
steps:
|
2021-02-12 17:11:07 +00:00
|
|
|
- name: fetch tags
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git fetch --tags
|
|
|
|
|
2021-01-09 16:11:30 +00:00
|
|
|
- name: build_install_test
|
|
|
|
image: python
|
|
|
|
commands:
|
|
|
|
- python --version
|
|
|
|
- pwd
|
|
|
|
- pip install flake8
|
|
|
|
### develop
|
|
|
|
# You can build the distribution with
|
|
|
|
# ```
|
2021-08-24 17:58:55 +00:00
|
|
|
- pip install build
|
|
|
|
- python -m build .
|
2021-01-09 16:11:30 +00:00
|
|
|
# ```
|
|
|
|
# That will produce a `.whl` file in the `dist` subdirectory.
|
|
|
|
###
|
|
|
|
- pip install dist/mkdocs_semiliterate*.whl
|
|
|
|
### develop
|
|
|
|
# ### Testing
|
|
|
|
#
|
2022-08-02 03:01:26 +00:00
|
|
|
# If you have a Docker daemon running on your local machine and the Drone
|
2021-01-09 16:11:30 +00:00
|
|
|
# [command-line](https://readme.drone.io/cli/install) installed, you can run all
|
|
|
|
# of the tests via `drone exec`. If not, or if you don't want to wait for the
|
|
|
|
# Docker container to spin up and install all of the prerequisites, you can make
|
|
|
|
# sure you have the version of mkdocs-semiliterate that you want to test
|
|
|
|
# currently properly installed in the python you are currently running, and then
|
|
|
|
# starting from the top-level `mkdocs-semiliterate` directory, run the commands
|
|
|
|
# that drone uses to test:
|
|
|
|
# ```
|
2024-09-15 18:49:57 +00:00
|
|
|
- flake8 --max-line-length=80 --extend-exclude=build --extend-exclude=.venv
|
2021-01-09 16:11:30 +00:00
|
|
|
- mkdocs build
|
|
|
|
- find site -not -path '*fonts*' -not -path '*img*' -not -path '*js*' | sort -f | diff tests/bootstrap.manifest -
|
2021-01-10 17:12:49 +00:00
|
|
|
- bash tests/sites.bash
|
2021-01-09 16:11:30 +00:00
|
|
|
# ```
|
|
|
|
# All of the commands should succeed and none of the diffs should produce any
|
|
|
|
# output.
|
|
|
|
###
|
2021-01-10 04:13:01 +00:00
|
|
|
|
2021-01-09 16:11:30 +00:00
|
|
|
- name: validate
|
|
|
|
image: klakegg/html-proofer:latest
|
|
|
|
volumes:
|
|
|
|
- site: /src
|
|
|
|
command: ['--url-ignore', 'https://fonts.gstatic.com', '--allow-hash-href',
|
|
|
|
'--file-ignore', './site/404.html,/.*tests.*/']
|
|
|
|
|
2021-01-10 04:13:01 +00:00
|
|
|
- name: pre_deploy
|
|
|
|
image: debian
|
|
|
|
commands:
|
|
|
|
- mv site semiliterate
|
|
|
|
when:
|
|
|
|
event: [promote]
|
|
|
|
target: [release]
|
|
|
|
|
|
|
|
- name: deploy
|
|
|
|
image: appleboy/drone-scp
|
|
|
|
settings:
|
|
|
|
host: studioinfinity.org
|
|
|
|
user: bitnami
|
|
|
|
key:
|
|
|
|
from_secret: bitnami_key
|
|
|
|
target: /opt/bitnami/apps/wordpress/htdocs/
|
|
|
|
source: semiliterate
|
|
|
|
when:
|
|
|
|
event: [promote]
|
|
|
|
target: [release]
|
|
|
|
|
2021-01-09 16:11:30 +00:00
|
|
|
### develop
|
|
|
|
# ### Contributing
|
|
|
|
#
|
|
|
|
# You can report issues at the
|
|
|
|
# [repository site](https://code.studioinfinity.org/glen/mkdocs-semiliterate).
|
|
|
|
# Pull requests are welcome as well. If you're new to contributing to open-source
|
|
|
|
# projects, `mkdocs-simple-plugin` has a very nice
|
2024-09-16 02:32:14 +00:00
|
|
|
# [tutorial](https://althack.dev/mkdocs-simple-plugin/v{! setup.cfg { extract: {start: 'mkdocs~=', stop: '(\d*\.\d*\.?\d*)'}} !}/CONTRIBUTING/).
|
2021-08-24 22:47:33 +00:00
|
|
|
#
|
|
|
|
# ### Publishing
|
|
|
|
#
|
|
|
|
# This package is published to [PyPI](https://pypi.org/project/mkdocs-semiliterate/)
|
|
|
|
# using [twine](https://twine.readthedocs.io). Mostly to jog the developer's
|
|
|
|
# memory, when a new release is freshly built, the command to update PyPI is
|
2022-08-02 05:03:48 +00:00
|
|
|
# `twine upload dist/*`. Also don't forget to create a fresh release on the
|
|
|
|
# repository site as well.
|
2021-01-09 16:11:30 +00:00
|
|
|
###
|