gitlab: Deploy documentation snapshot via GitLab Pages
authorBen Gamari <ben@smart-cactus.org>
Thu, 21 Mar 2019 16:59:11 +0000 (12:59 -0400)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Fri, 22 Mar 2019 14:08:38 +0000 (10:08 -0400)
.gitlab-ci.yml

index 8e5e7f7..ee0543a 100644 (file)
@@ -18,6 +18,7 @@ stages:
   - cleanup    # See Note [Cleanup on Windows]
   - packaging  # Source distribution, etc.
   - hackage    # head.hackage testing
+  - deploy     # push documentation
 
 .only-default: &only-default
   only:
@@ -718,3 +719,23 @@ nightly-hackage:
   only:
     variables:
       - $NIGHTLY
+
+pages:
+  stage: deploy
+  dependencies:
+    - doc-tarball
+  image: ghcci/x86_64-linux-deb9:0.2
+  tags:
+    - x86_64-linux
+  script:
+    - mkdir -p public/doc
+    - tar -xf haddock.html.tar.xz -C public/doc
+    - tar -xf libraries.html.tar.xz -C public/doc
+    - tar -xf users_guide.html.tar.xz -C public/doc
+    - cp -f index.html public/doc
+  only:
+    - master
+  artifacts:
+    paths:
+      - public
+