chore: set up automated deployment
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

Now, when one promotes a build in Drone to "release," the website should
  automatically be copied to studioinfinity.org
This commit is contained in:
Glen Whitney 2021-01-09 20:13:01 -08:00
parent ec0854d8b9
commit 03f3cc811b
5 changed files with 29 additions and 14 deletions

View File

@ -66,12 +66,13 @@ steps:
# unfortunately MkDocs writes the run date in the last few lines of index:
- head -n -3 site/index.html > site/croppedindex.html
- rm site/index.html
- diff -r -x img -x fonts -x js -x '*.gz' refsite site
- diff -r -x img -x fonts -x js -x '*.xml*' refsite site
# ```
# All of the commands should succeed and none of the diffs should produce any
# output.
###
- rm -r site
- name: validate
image: klakegg/html-proofer:latest
volumes:
@ -79,6 +80,27 @@ steps:
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
#

3
.gitignore vendored
View File

@ -125,6 +125,7 @@ venv.bak/
# mkdocs documentation
/site
/semiliterate
# mypy
.mypy_cache/
@ -140,3 +141,5 @@ dmypy.json
# Cython debug symbols
cython_debug/
# Secrets
secrets.txt

View File

@ -10,7 +10,8 @@ Time and trends have not validated Knuth's original vision of "literate programm
The mkdocs-simple-plugin goes a long way toward creating a semiliterate programming environment. However, in creating narrative documentation, it's very useful to be able to quote or incorporate content -- whether that be documentation blocks or code examples -- from one file into another. To satisfy that need, this `semiliterate` plugin extends (i.e, literally inherits from) the `simple` plugin and adds a syntax for such inclusion.
With a few other small ease-of-use tweaks (documented in the Usage section), this extended plugin aims to produce a lightweight but comprehensive semiliterate programming environment. <!-- repo: -->The<!-- site:This --> documentation site is, of course, produced by MkDocs using the semiliterate plugin.
With a few other small ease-of-use tweaks (documented in the <!-- repo: -->[Usage](http://studioinfinity.org/semiliterate/mkdocs_semiliterate/plugin)<!-- site:[Usage](mkdocs_semiliterate/plugin.md) --> section),
this extended plugin aims to produce a lightweight but comprehensive semiliterate programming environment. <!-- repo: -->The [documentation site](http://studioinfinity.org/semiliterate)<!-- site:This documentation site --> is, of course, produced by MkDocs using the semiliterate plugin.
## License

View File

@ -8,7 +8,7 @@ plugins:
- search
- semiliterate:
merge_docs_dir: false
ignore_folders: [build, dist, tests]
ignore_folders: [build, dist, tests, semiliterate]
include_extensions: [LICENSE]
report_docs_build: true
extract_standard_markdown:

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
<loc>None</loc>
<lastmod>2021-01-09</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2021-01-09</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>