aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlexandre Garand <alexandre.garand@fretlink.com>2019-07-05 12:15:04 +0200
committerAlexandre Garand <alexandre.garand@fretlink.com>2019-07-08 12:14:59 +0200
commit87e93609a5535755fb40e05996ff997657aac6d2 (patch)
treea1ca6075f55edc3322ce324e7305788a5d4b776c
parent5b5f8460537ecb489a9f544727513fc9b2d7d532 (diff)
downloadterraform-provider-mailgun-87e93609a5535755fb40e05996ff997657aac6d2.tar.gz
terraform-provider-mailgun-87e93609a5535755fb40e05996ff997657aac6d2.tar.zst
terraform-provider-mailgun-87e93609a5535755fb40e05996ff997657aac6d2.zip
add automatic push of github pages
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
-rw-r--r--.travis.yml13
-rw-r--r--GNUmakefile2
-rwxr-xr-xscripts/launch-website.sh11
3 files changed, 24 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index a20fc58..cc6e6c7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,7 +19,18 @@ script:
19- make vet 19- make vet
20- make website-test 20- make website-test
21- make shellcheck 21- make shellcheck
22- make website-githubpages
22 23
24deploy:
25 provider: pages
26 skip_cleanup: true
27 github_token: $GITHUB_TOKEN
28 target_branch: gh-pages
29 keep_history: true
30 local_dir: terraform-provider-website
31 on:
32 all_branches: true
33
23matrix: 34matrix:
24 fast_finish: true 35 fast_finish: true
25 allow_failures: 36 allow_failures:
@@ -33,5 +44,3 @@ cache:
33env: 44env:
34 matrix: 45 matrix:
35 - GO111MODULE=on 46 - GO111MODULE=on
36 global:
37 - 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=
diff --git a/GNUmakefile b/GNUmakefile
index 7750632..fe6e28c 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -46,6 +46,8 @@ test-compile:
46 fi 46 fi
47 go test -c $(TEST) $(TESTARGS) 47 go test -c $(TEST) $(TESTARGS)
48 48
49website-githubpages:
50 bash scripts/launch-website.sh
49website: 51website:
50ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) 52ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
51 echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." 53 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
index 0000000..f146e75
--- /dev/null
+++ b/scripts/launch-website.sh
@@ -0,0 +1,11 @@
1#!/usr/bin/env bash
2
3(sleep 10;
4wget --recursive --no-parent --domains localhost --page-requisites --html-extension --convert-links --no-clobber http://localhost:4567/docs/providers/mailgun/;
5
6rm -rf terraform-provider-website;
7mv localhost:4567/ terraform-provider-website;
8
9docker stop "$(docker ps -q)") &
10
11make website