]> git.immae.eu Git - github/fretlink/terraform-provider-mailgun.git/commitdiff
add automatic push of github pages
authorAlexandre Garand <alexandre.garand@fretlink.com>
Fri, 5 Jul 2019 10:15:04 +0000 (12:15 +0200)
committerAlexandre Garand <alexandre.garand@fretlink.com>
Mon, 8 Jul 2019 10:14:59 +0000 (12:14 +0200)
add target in the makefile and the script used by it to get the website
update .travis.yml to push the website on ghpages branch

.travis.yml
GNUmakefile
scripts/launch-website.sh [new file with mode: 0755]

index a20fc5867041760bb9df3bc9e96cf57336aa75fc..cc6e6c73e5f7a67e76574d2e0d21ef2330028341 100644 (file)
@@ -19,7 +19,18 @@ script:
 - make vet
 - make website-test
 - make shellcheck
+- make website-githubpages
 
+deploy:
+  provider: pages
+  skip_cleanup: true
+  github_token: $GITHUB_TOKEN 
+  target_branch: gh-pages
+  keep_history: true
+  local_dir: terraform-provider-website
+  on:
+    all_branches: true
+    
 matrix:
   fast_finish: true
   allow_failures:
@@ -33,5 +44,3 @@ cache:
 env:
   matrix:
     - GO111MODULE=on
-  global:
-    - secure: rWjnWJgGEk2ncl6TXnpahUmriGSEaHGy+ZfmKKGpvrZxnlNY6sy63+qrnJNwaiV6uRG+kPfEChYD+dYfhjZRb3JWivo/ILCM9E0M9Ike6YAAsJKrcl0rUwFgqhBVXRdpBCSieYGiY8xNH/4Wu6i4bD9F1vSmpkvxYwae+7vGvyhEhyGMqWU92Svlus//K0Y27Qvlcw+Mx35nhdZsaeKN1Tb7uCHed9+vpCHud9NpSJLqxBjQl+1ibJ0Fqefyqbqy5dO0X3xE70eUMwM70ew+sgwzyq45VDBRPtVAN+8mtLOp2BVZE7SXFydfqnAm+1cbgzYBE5t+HlXwZzpRrtSwj+NRUt+7UtlrdfhMRmUVW76qWyMbF8CY6i06a73XWMYffKg3Ux2h0AHimvPJl8y+luMYmrl0RdgyLDcR0t9La0PNhOrKsauzkNX7KGPZwjTWv3+2RrsXDdT0Pi3JL15myyEuxiSAdDLIyiFB0sz9mCzYiu02SKKyURfo3bhMUrrBRbF47CpLTiCJrNBI36rk/cO4QJXyd9axEhy7vXiQObvaWZKbBqMTsL9EOZijJt5I1UxjwbCGM/GyYSrDK/+7d7PF0bvjo+8ps/o2WIW5B63IZiadzIt6nUOlEpFoOUsn0x4mufzIzMd+CSXdTxdXqRIXHxf5pKAUQZ8u7uRwERY=
index 7750632f454dedd1a34e6168376d583c1e160a68..fe6e28c931bd23928e0f4c320c18fcb2d394f462 100644 (file)
@@ -46,6 +46,8 @@ test-compile:
        fi
        go test -c $(TEST) $(TESTARGS)
 
+website-githubpages:
+       bash scripts/launch-website.sh
 website:
 ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
        echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
diff --git a/scripts/launch-website.sh b/scripts/launch-website.sh
new file mode 100755 (executable)
index 0000000..f146e75
--- /dev/null
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+(sleep 10;
+wget --recursive --no-parent --domains localhost --page-requisites --html-extension --convert-links --no-clobber http://localhost:4567/docs/providers/mailgun/;
+
+rm -rf terraform-provider-website;
+mv localhost:4567/ terraform-provider-website;
+
+docker stop "$(docker ps -q)") &
+
+make website