Skip to content

Commit

Permalink
Merge pull request #354 from ePages-de/develop
Browse files Browse the repository at this point in the history
Release v0.9.4
  • Loading branch information
Unai Abrisketa authored Oct 18, 2018
2 parents 4517f7c + d5565c7 commit 50f5748
Show file tree
Hide file tree
Showing 4 changed files with 692 additions and 45 deletions.
100 changes: 58 additions & 42 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,8 @@
version: 2

defaults: &defaults
working_directory: ~/repo

deploy: &deploy
docker:
- image: circleci/python:3.6.3
steps:
- attach_workspace:
at: ./
- run:
name: Install AWS CLI
command: pip install awscli --upgrade --user
- run:
name: Download epages-docs
command: |
~/.local/bin/aws s3 sync s3://$S3_BUCKET_NAME ./_site --exclude "about/*" \
--exclude "api/*" \
--exclude "beyond-essence/*" \
--exclude "blog/*" \
--exclude "devjobs/*" \
--exclude "api/*" \
--exclude "assets/css/*" \
--exclude "assets/fonts/*" \
--exclude "assets/img/*" \
--exclude "assets/js/*" \
--exclude "assets/slick/*" \
--exclude "404.html" \
--exclude "index.html"
- run:
name: Upload to S3
command: ~/.local/bin/aws s3 sync ./_site s3://$S3_BUCKET_NAME/ --size-only --delete --acl public-read

version: 2

jobs:
build_test:
<<: *defaults
Expand Down Expand Up @@ -62,33 +33,78 @@ jobs:
root: ./
paths:
- ./_site
- ./.firebaserc
- ./firebase.json

deploy_production:
<<: *defaults
environment:
S3_BUCKET_NAME: developer.epages.com
<<: *deploy
deploy_firebase:
docker:
- image: circleci/node:6.10.3
steps:
- attach_workspace:
at: ./
- run:
name: Install Firebase tools
command: npm install --save-dev firebase-tools

- run:
name: Deploy to Firebase
command: ./node_modules/.bin/firebase deploy --token=$FIREBASE_TOKEN --non-interactive

deploy_staging:
deploy_aws:
<<: *defaults
environment:
S3_BUCKET_NAME: staging.developer.epages.com
<<: *deploy
docker:
- image: circleci/python:3.6.3
steps:
- attach_workspace:
at: ./
- run:
name: Install AWS CLI
command: pip install awscli --upgrade --user
- run:
name: Download epages-docs
command: |
~/.local/bin/aws s3 sync s3://$S3_BUCKET_NAME ./_site --exclude "about/*" \
--exclude "api/*" \
--exclude "beyond-essence/*" \
--exclude "blog/*" \
--exclude "devjobs/*" \
--exclude "api/*" \
--exclude "assets/css/*" \
--exclude "assets/fonts/*" \
--exclude "assets/img/*" \
--exclude "assets/js/*" \
--exclude "assets/slick/*" \
--exclude "404.html" \
--exclude "index.html"
- run:
name: Deploy to S3
command: ~/.local/bin/aws s3 sync ./_site s3://$S3_BUCKET_NAME/ --size-only --delete --acl public-read

- persist_to_workspace:
root: ./
paths:
- ./_site
- ./.firebaserc
- ./firebase.json

workflows:
version: 2
build_test_deploy:
jobs:
- build_test
- deploy_production:
- deploy_firebase:
requires:
- build_test
- deploy_aws
filters:
branches:
only: master
- deploy_staging:
- deploy_aws:
requires:
- build_test
filters:
branches:
only: develop
only:
- develop
- master
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "epages-devportal"
}
}
4 changes: 1 addition & 3 deletions assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ $(window).on('load', function() {
this.field('category');
this.field('tags');
this.field('authors');
this.field('content');
});

for (var key in window.store) {
Expand All @@ -64,8 +63,7 @@ $(window).on('load', function() {
'title': window.store[key].title,
'category': window.store[key].category,
'tags': window.store[key].tags,
'authors': window.store[key].authors,
'content': window.store[key].content
'authors': window.store[key].authors
});

var results = idx.search(searchTerm);
Expand Down
Loading

0 comments on commit 50f5748

Please sign in to comment.