grim/convey

Create a zip file for the docs

10 months ago, Gary Kramlich
c6695a974177
Parents 1b692d310d7e
Children b3868a101c61
Create a zip file for the docs

Also renamed `convey-docs.yml` as it was getting deleted by the convey clean plan previously.

Testing Done:
Ran locally and verified the zip file was structured correctly.

Reviewed at https://reviews.imfreedom.org/r/2469/
--- a/convey-docs.yml Tue May 23 00:15:02 2023 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
----
-tasks:
- import:
- type: docker/import
- files:
- - .:.
-
- clean:
- type: convey/clean
- files: site
-
- # we explicitly call out jinja2==3.0.3 because 3.1.0 breaks mkdocs
- # https://github.com/mkdocs/mkdocs/issues/2799
- build:
- type: docker/run
- image: docker.io/python:3-alpine
- workdir: ${CONVEY_WORKSPACE}
- script:
- - set -ex
- - python3 -m pip install mkdocs jinja2==3.0.3
- - mkdocs build
-
- export:
- type: docker/export
- files: site:site
-
-plans:
- default:
- stages:
- - tasks:
- - clean
- - tasks:
- - import
- - build
- - export
- clean:
- stages:
- - tasks:
- - clean
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convey.docs.yml Mon Jun 19 14:45:53 2023 -0500
@@ -0,0 +1,47 @@
+---
+tasks:
+ import:
+ type: docker/import
+ files:
+ - .:.
+
+ clean:
+ type: convey/clean
+ files:
+ - convey-docs.zip
+ - site
+
+ # we explicitly call out jinja2==3.0.3 because 3.1.0 breaks mkdocs
+ # https://github.com/mkdocs/mkdocs/issues/2799
+ build:
+ type: docker/run
+ image: docker.io/python:3-alpine
+ workdir: ${CONVEY_WORKSPACE}
+ script:
+ - set -ex
+ - python3 -m pip install mkdocs jinja2
+ - mkdocs build
+ - apk add --no-cache zip
+ - mkdir t # we need to use a temporary directory as we may have a convey executable in the workspace
+ - mv site t/convey
+ - cd t
+ - zip -9r convey-docs.zip convey
+
+ export:
+ type: docker/export
+ files: t/convey.zip:convey.zip
+
+plans:
+ default:
+ stages:
+ - tasks:
+ - clean
+ - tasks:
+ - import
+ - build
+ - export
+ clean:
+ stages:
+ - tasks:
+ - clean
+