mirror of
https://github.com/kremalicious/blog.git
synced 2025-01-03 18:35:07 +01:00
remove Travis
This commit is contained in:
parent
d0daa22e1b
commit
8777a8df7b
@ -10,7 +10,7 @@ LICENSE
|
||||
.vscode
|
||||
public
|
||||
.cache
|
||||
.travis.yml
|
||||
.github
|
||||
package-lock.json
|
||||
README.md
|
||||
coverage
|
||||
|
41
.travis.yml
41
.travis.yml
@ -1,41 +0,0 @@
|
||||
dist: xenial
|
||||
language: node_js
|
||||
node_js: node
|
||||
|
||||
git:
|
||||
depth: 10
|
||||
|
||||
cache:
|
||||
npm: true
|
||||
directories:
|
||||
- public
|
||||
|
||||
before_install:
|
||||
- sudo apt-get -qq update
|
||||
- sudo apt-get install python3-pip
|
||||
- sudo -H pip3 install --upgrade pip
|
||||
|
||||
before_script:
|
||||
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||
- chmod +x ./cc-test-reporter
|
||||
- './cc-test-reporter before-build'
|
||||
|
||||
script:
|
||||
- npm test
|
||||
- './cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT'
|
||||
- travis_wait 60 npm run build
|
||||
|
||||
after_success:
|
||||
- pip install --user awscli
|
||||
- export PATH=$PATH:$HOME/.local/bin
|
||||
- npm run deploy
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
slack:
|
||||
template:
|
||||
- '%{branch} *%{result}* build (<%{build_url}|#%{build_number}>) for <%{compare_url}|%{commit}>'
|
||||
- 'Execution time: *%{duration}*'
|
||||
- 'Message: %{message}'
|
||||
rooms:
|
||||
- secure: 'Ot7Ryl4PW0/TUo4t4Y3J6AbmxqNUtFOI72vNabNX2IdEiU78q+M3esPEkT2I/z0S2Vda9ogRkRbKa5blE2ZEo74/9CUYRXX/syPSZL9tpHDd600wmiObee469Au8dSO48n8G9U+Dm1q60O6oiEGsrrAR6fNE386QEfDhVqKKwBKHk9RcUocUO2b+0WKI7MJk+j5G4+sxv/5ax8prGx0sD6bRoGRuNpyW/MZ9uylBV2WOdmHfEY9D8GYpzVs2JqTB7xr/OL9d+puZPQSdqGfa7xtc+APFiKK//aW/ffOsNzGa4kygC94nfV4oJceMUO3v0bDpB5aXM1YG02EyQzSwpGCbtnbP9Ei/ANcGqiFjPm1/ZVAiwPzT8XZLWkFjy+sOfmF+xmszUCoRiJBVxfL0tx0d1o/JIvgA5m+/iIpro70ep0nBHTiDt2AoxaGGE9GnIT20uVXJJIdXIwTWhVx4HnkptYsFel9l2/oc24S+CnitRaCtGQCiAMNNCESL1AcHCRot/4gm3uuZLdYEA1juHUvgEEH6jG5T2XWaq4uEbDZKdu8y7YMW105FytEsyNU3Tzem4c024EIAhBshSfg5N/iwVeic47E1QAz/5RtfBNLQaEPY4TGJYJvTOaCevjYC7mKlYBEoZmsfT0uNaWqEXUxUwLg5Ih8JoLQKvH6H4fA='
|
19
README.md
19
README.md
@ -1,5 +1,5 @@
|
||||
<p align="center">
|
||||
<a href="https://kremalicious.com"><img src="src/images/github-header.png" /></a>
|
||||
<a href="https://kremalicious.com"><img src="[src/images/github-header.png](https://raw.githubusercontent.com/kremalicious/portfolio/main/src/images/github-header.png)" /></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<strong>🍭 My blog built with <a href="http://gatsbyjs.org">Gatsby</a> + TypeScript. Neat.</strong>
|
||||
@ -8,10 +8,9 @@
|
||||
<a href="https://kremalicious.com">kremalicious.com</a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.com/kremalicious/blog"><img src="https://travis-ci.com/kremalicious/blog.svg?branch=main" /></a>
|
||||
<a href="https://github.com/kremalicious/blog/actions"><img src="https://github.com/kremalicious/blog/workflows/CI/badge.svg" /></a>
|
||||
<a href="https://codeclimate.com/github/kremalicious/blog/maintainability"><img src="https://api.codeclimate.com/v1/badges/4e86c791349cd12368cd/maintainability" /></a>
|
||||
<a href="https://codeclimate.com/github/kremalicious/blog/test_coverage"><img src="https://api.codeclimate.com/v1/badges/4e86c791349cd12368cd/test_coverage" /></a>
|
||||
<a href="https://dependabot.com"><img src="https://badgen.net/dependabot/thepracticaldev/dev.to?icon=dependabot" /></a>
|
||||
</p>
|
||||
|
||||
---
|
||||
@ -33,6 +32,7 @@
|
||||
- [👩🔬 Testing](#-testing)
|
||||
- [🎈 Add a new post](#-add-a-new-post)
|
||||
- [🚚 Deployment](#-deployment)
|
||||
- [S3 Deployment](#s3-deployment)
|
||||
- [🏛 Licenses](#-licenses)
|
||||
- [Posts](#posts)
|
||||
- [Photos & images](#photos--images)
|
||||
@ -233,19 +233,18 @@ npm run new photo /path/to/photo.jpg
|
||||
|
||||
## 🚚 Deployment
|
||||
|
||||
Automatic deployments are triggered upon successful tests & builds on Travis:
|
||||
Every branch or Pull Request is automatically deployed by [Vercel](https://vercel.com) with their GitHub integration. A link to a preview deployment will appear under each Pull Request.
|
||||
|
||||
- push to `main` initiates a live deployment
|
||||
- any Pull Request, and subsequent pushes to it, initiates a beta deployment
|
||||
The latest deployment of the `main` branch is automatically aliased to `kremalicious.com`.
|
||||
|
||||
The deploy command simply calls the [`scripts/deploy.sh`](scripts/deploy.sh) script, syncing the contents of the `public/` folder to S3:
|
||||
### S3 Deployment
|
||||
|
||||
The deploy command simply calls the [`scripts/deploy-s3.sh`](scripts/deploy-s3.sh) script, syncing the contents of the `public/` folder to S3:
|
||||
|
||||
```bash
|
||||
npm run deploy
|
||||
npm run deploy:s3
|
||||
```
|
||||
|
||||
The deploymeng script can be used locally too, the branch checks are only happening for Travis builds, allowing to deploy any branch from local machine.
|
||||
|
||||
## 🏛 Licenses
|
||||
|
||||
The MIT License (MIT)
|
||||
|
@ -19,7 +19,7 @@
|
||||
"lint:md": "markdownlint './**/*.{md,markdown}' --ignore './{node_modules,public,.cache,.git,coverage}/**/*'",
|
||||
"format": "prettier --ignore-path .gitignore --write '**/*.{js,jsx,ts,tsx,md,json,css,scss}'",
|
||||
"tsc": "tsc --noEmit",
|
||||
"deploy": "./scripts/deploy.sh",
|
||||
"deploy:s3": "./scripts/deploy.sh",
|
||||
"new": "babel-node ./scripts/new.js"
|
||||
},
|
||||
"browserslist": [
|
||||
|
@ -5,7 +5,6 @@
|
||||
# AWS_SECRET_ACCESS_KEY
|
||||
# AWS_DEFAULT_REGION
|
||||
AWS_S3_BUCKET="kremalicious.com"
|
||||
AWS_S3_BUCKET_BETA="beta.kremalicious.com"
|
||||
SITEMAP_URL="https%3A%2F%2Fkremalicious.com%2Fsitemap.xml"
|
||||
|
||||
#
|
||||
@ -47,36 +46,10 @@ function s3sync {
|
||||
--acl public-read
|
||||
}
|
||||
|
||||
##
|
||||
## check for pull request against main
|
||||
##
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "main" ]; then
|
||||
s3sync $AWS_S3_BUCKET
|
||||
|
||||
s3sync $AWS_S3_BUCKET_BETA
|
||||
|
||||
##
|
||||
## check for main push which is no pull request
|
||||
##
|
||||
elif [ "$TRAVIS_BRANCH" == "main" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] || [ "$TRAVIS" != true ]; then
|
||||
|
||||
s3sync $AWS_S3_BUCKET
|
||||
|
||||
# ping search engines
|
||||
# returns: HTTP_STATUSCODE URL
|
||||
curl -sL -w "%{http_code} %{url_effective}\\n" \
|
||||
"http://www.google.com/webmasters/tools/ping?sitemap=$SITEMAP_URL" -o /dev/null \
|
||||
"http://www.bing.com/webmaster/ping.aspx?siteMap=$SITEMAP_URL" -o /dev/null
|
||||
|
||||
echo "---------------------------------------------"
|
||||
echo " ✓ done deployment "
|
||||
echo "---------------------------------------------"
|
||||
|
||||
exit;
|
||||
|
||||
else
|
||||
|
||||
echo "---------------------------------------------"
|
||||
echo " nothing to deploy "
|
||||
echo "---------------------------------------------"
|
||||
|
||||
fi
|
||||
# ping search engines
|
||||
# returns: HTTP_STATUSCODE URL
|
||||
curl -sL -w "%{http_code} %{url_effective}\\n" \
|
||||
"http://www.google.com/webmasters/tools/ping?sitemap=$SITEMAP_URL" -o /dev/null \
|
||||
"http://www.bing.com/webmaster/ping.aspx?siteMap=$SITEMAP_URL" -o /dev/null
|
Loading…
Reference in New Issue
Block a user