Skip to content

Commit

Permalink
chore(build): publish demo site through CI
Browse files Browse the repository at this point in the history
Now Travis CI will be publishing a rebuilt demo site on every `master` commit
  • Loading branch information
DethAriel committed Jul 22, 2021
1 parent c629a9e commit 4ecaa26
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 102 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ jobs:
- name: "Build demo site"
script:
- yarn demo:build
deploy:
- provider: pages:git
token:
secure: "t2FzZ2mrON6ZrSy4ZguhRy8JkMq5GGIY8wx8ozD9CpthdJ0zWGktHvBi3g/a7Oh60TT16Bwu4q7yFH1nf3yyeIjxzodjJINDMRz/23MO215TkMufeyEV3tcvTWoq4SsbXneQBsjPNhM/z874jmVkjn5Ea0iiMR6wAPFNCFZxzhF/wbv/yBICc6Jt51zWzu0mth859HeYdk2VVf/qBXo//9Y4EGNuen1f2DI6lnsp/FDm7RX+pBoc1zFc9Tmk/RIISdlklKvE4QeGBqn17iOMfIQqY5RPlYHTFzrE8Cc5lkyOObio7rhNOfxrGKl5zNnscvjWpEsYAcVpEeSrT6uTI1VY2naPJnzGmCbBTkzrO7pNLTCmBe6iYV8X/UiknaVZldwrQIyj2IA4vb3dStu2NkF/aOD5/X56l3boVAShHgMVo2eh03JXH2hY6NPNXi7vr4ewP8RVH5PHjUStwo+KLOIlR8tcR9XJ2XCMXTlsQN1qgdc4h0giYLyILMcAh9AM5+ydsEx6KgyxFUV/m4uFKNkEMo0ktgOHqcjiCQtNJV9zpHglka+T4s+dqJ7hFSOOM1jy9XSLd1ANmjNkwDPUpjdsPvQj5qz9tV0tkm6XjFgHbQqGfHuVbNS72YjR9EWuya73DzBKvwXdxNNO8k4GQ2LtB38YxlBHMKWRyJOVV44="
edge: true # opt in to dpl v2
keep_history: false # since we'll be re-deploying with every commit to master, it makes sense to overwrite history
local_dir: dist/demo/ng-recaptcha
on:
branch: master
- name: "Run unit tests"
script:
- yarn ng test ng-recaptcha --code-coverage
Expand Down
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ After you did that, follow the below process:
- Verify the latest commit, and run `git push && git push --tag` to push the changes to the origin
- Wait for the build to succeed
- Publish the package to npm _from the "/dist/ng-recaptcha" directory_: `cd dist/ng-recaptcha && npm publish` (or `cd dist/ng-recaptcha && npm publish --tag beta`)
- Create a GitHub release and update the demo site by running `yarn github-release && yarn demo:build && yarn demo:publish`
- Create a GitHub release by running `yarn github-release`

### Updating Travis CI secrets

Some variables in the `.travis.yml` file are secrets 🤫 (like deployment token for `provider: pages:git`). To manipulate those, head on to [Travis CI](https://docs.travis-ci.com/user/encryption-keys/) docs.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"demo:build": "yarn demo:file-gen && ng build demo --configuration production && yarn demo:copy-entrypoints",
"demo:copy-entrypoints": "ts-node --project ./tsconfig.node.json ./projects/demo/bin/copy-entrypoints.ts",
"demo:serve-http": "http-server ./dist/demo -a localhost -p 9000 -c-1",
"demo:publish": "gh-pages -d dist/demo/ng-recaptcha",
"clean": "rimraf dist",
"changelog": "conventional-changelog --preset angular --infile CHANGELOG.md --same-file",
"github-release": "conventional-github-releaser --preset angular",
Expand Down Expand Up @@ -62,7 +61,6 @@
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^30.7.8",
"eslint-plugin-prefer-arrow": "^1.2.2",
"gh-pages": "^3.1.0",
"highlight.js": "^10.4.1",
"http-server": "^0.12.3",
"husky": "^4.3.0",
Expand Down
101 changes: 2 additions & 99 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2106,7 +2106,7 @@ async-limiter@~1.0.0:
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd"
integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==

async@^2.6.1, async@^2.6.2:
async@^2.6.2:
version "2.6.3"
resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff"
integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==
Expand Down Expand Up @@ -2777,7 +2777,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6:
dependencies:
delayed-stream "~1.0.0"

commander@^2.18.0, commander@^2.20.0:
commander@^2.20.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
Expand Down Expand Up @@ -3821,11 +3821,6 @@ electron-to-chromium@^1.3.723:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz#857e310ca00f0b75da4e1db6ff0e073cc4a91ddf"
integrity sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==

email-addresses@^3.0.1:
version "3.1.0"
resolved "https://registry.yarnpkg.com/email-addresses/-/email-addresses-3.1.0.tgz#cabf7e085cbdb63008a70319a74e6136188812fb"
integrity sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==

emoji-regex@^7.0.1:
version "7.0.3"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
Expand Down Expand Up @@ -4424,28 +4419,6 @@ file-uri-to-path@1.0.0:
resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==

filename-reserved-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz#e61cf805f0de1c984567d0386dc5df50ee5af7e4"
integrity sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=

filenamify-url@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/filenamify-url/-/filenamify-url-1.0.0.tgz#b32bd81319ef5863b73078bed50f46a4f7975f50"
integrity sha1-syvYExnvWGO3MHi+1Q9GpPeXX1A=
dependencies:
filenamify "^1.0.0"
humanize-url "^1.0.0"

filenamify@^1.0.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-1.2.1.tgz#a9f2ffd11c503bed300015029272378f1f1365a5"
integrity sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=
dependencies:
filename-reserved-regex "^1.0.0"
strip-outer "^1.0.0"
trim-repeated "^1.0.0"

fill-range@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
Expand Down Expand Up @@ -4747,19 +4720,6 @@ gh-got@^7.0.0:
got "^8.0.0"
is-plain-obj "^1.1.0"

gh-pages@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-3.1.0.tgz#ec3ed0f6a6e3fc3d888758fa018f08191c96bd55"
integrity sha512-3b1rly9kuf3/dXsT8+ZxP0UhNLOo1CItj+3e31yUVcaph/yDsJ9RzD7JOw5o5zpBTJVQLlJAASNkUfepi9fe2w==
dependencies:
async "^2.6.1"
commander "^2.18.0"
email-addresses "^3.0.1"
filenamify-url "^1.0.0"
find-cache-dir "^3.3.1"
fs-extra "^8.1.0"
globby "^6.1.0"

git-raw-commits@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5"
Expand Down Expand Up @@ -5211,14 +5171,6 @@ humanize-ms@^1.2.1:
dependencies:
ms "^2.0.0"

humanize-url@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/humanize-url/-/humanize-url-1.0.1.tgz#f4ab99e0d288174ca4e1e50407c55fbae464efff"
integrity sha1-9KuZ4NKIF0yk4eUEB8VfuuRk7/8=
dependencies:
normalize-url "^1.0.0"
strip-url-auth "^1.0.0"

husky@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.0.tgz#0b2ec1d66424e9219d359e26a51c58ec5278f0de"
Expand Down Expand Up @@ -7041,16 +6993,6 @@ normalize-url@2.0.1:
query-string "^5.0.1"
sort-keys "^2.0.0"

normalize-url@^1.0.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
integrity sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=
dependencies:
object-assign "^4.0.1"
prepend-http "^1.0.0"
query-string "^4.1.0"
sort-keys "^1.0.0"

normalize-url@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
Expand Down Expand Up @@ -8319,11 +8261,6 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==

prepend-http@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=

prepend-http@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
Expand Down Expand Up @@ -8470,14 +8407,6 @@ query-string@*:
split-on-first "^1.0.0"
strict-uri-encode "^2.0.0"

query-string@^4.1.0:
version "4.3.4"
resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb"
integrity sha1-u7aTucqRXCMlFbIosaArYJBD2+s=
dependencies:
object-assign "^4.1.0"
strict-uri-encode "^1.0.0"

query-string@^5.0.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb"
Expand Down Expand Up @@ -9399,13 +9328,6 @@ socks@^2.3.3:
ip "^1.1.5"
smart-buffer "^4.1.0"

sort-keys@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad"
integrity sha1-RBttTTRnmPG05J6JIK37oOVD+a0=
dependencies:
is-plain-obj "^1.0.0"

sort-keys@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128"
Expand Down Expand Up @@ -9815,18 +9737,6 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==

strip-outer@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631"
integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==
dependencies:
escape-string-regexp "^1.0.2"

strip-url-auth@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/strip-url-auth/-/strip-url-auth-1.0.1.tgz#22b0fa3a41385b33be3f331551bbb837fa0cd7ae"
integrity sha1-IrD6OkE4WzO+PzMVUbu4N/oM164=

style-loader@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-2.0.0.tgz#9669602fd4690740eaaec137799a03addbbc393c"
Expand Down Expand Up @@ -10128,13 +10038,6 @@ trim-off-newlines@^1.0.0:
resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"
integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM=

trim-repeated@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21"
integrity sha1-42RqLqTokTEr9+rObPsFOAvAHCE=
dependencies:
escape-string-regexp "^1.0.2"

ts-node@^9.1.1:
version "9.1.1"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d"
Expand Down

0 comments on commit 4ecaa26

Please sign in to comment.