107 lines
3.1 KiB
YAML
107 lines
3.1 KiB
YAML
---
|
|
### develop
|
|
# ## Developing
|
|
#
|
|
# You can clone the repository with
|
|
# ```
|
|
# git clone https://code.studioinfinity.org/glen/mkdocs-semiliterate
|
|
# ```
|
|
###
|
|
kind: pipeline
|
|
name: bootstrap
|
|
steps:
|
|
- name: build_install_test
|
|
image: python
|
|
commands:
|
|
- python --version
|
|
- pwd
|
|
- pip install flake8
|
|
- cd ..
|
|
### install
|
|
# ## Installation
|
|
#
|
|
# At the moment, `semiliterate` relies on the latest pre-release version of
|
|
# `mkdocs-simple-plugin`. Therefore, you must clone and install that repository
|
|
# before installing `semiliterate`.
|
|
# ```
|
|
- git clone https://github.com/athackst/mkdocs-simple-plugin.git
|
|
- cd mkdocs-simple-plugin
|
|
- pip install .
|
|
# ```
|
|
# Once that's in place, you can install semiliterate; right now as there has
|
|
# not yet been a release, you should do that by cloning and installing as well:
|
|
# ```
|
|
# git clone https://code.studioinfinity.org/glen/mkdocs-semiliterate
|
|
# cd mkdocs-semiliterate
|
|
# pip install .
|
|
# ```
|
|
###
|
|
- cd ../src
|
|
### develop
|
|
# You can build the distribution with
|
|
# ```
|
|
- pip install pep517
|
|
- python -m pep517.build .
|
|
# ```
|
|
# That will produce a `.whl` file in the `dist` subdirectory.
|
|
###
|
|
- pip install dist/mkdocs_semiliterate*.whl
|
|
### develop
|
|
# ### Testing
|
|
#
|
|
# If you have a a Docker daemon running on your local machine and the Drone
|
|
# [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:
|
|
# ```
|
|
- flake8 --max-line-length=80 --extend-exclude=build
|
|
- mkdocs build
|
|
- find site -not -path '*fonts*' -not -path '*img*' -not -path '*js*' | sort -f | diff tests/bootstrap.manifest -
|
|
- bash tests/sites.bash
|
|
# ```
|
|
# All of the commands should succeed and none of the diffs should produce any
|
|
# output.
|
|
###
|
|
|
|
- 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.*/']
|
|
|
|
- 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]
|
|
|
|
### 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
|
|
# [tutorial](https://athackst.github.io/mkdocs-simple-plugin/CONTRIBUTING/).
|
|
###
|