diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..2e7e223b3 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,167 @@ +version: 2.1 +orbs: + k8s: circleci/kubernetes@0.7.0 + slack: circleci/slack@3.4.2 +commands: + git_checkout_from_cache: + description: "Git checkout and save cache" + steps: + - restore_cache: + name: Git restore cache + keys: + - source-v2-{{ .Branch }}-{{ .Revision }} + - source-v2-{{ .Branch }}- + - source-v2- + - run: + name: Fetch git tags + command: | + mkdir -p ~/.ssh + ssh-keyscan github.com >> ~/.ssh/known_hosts + # Fetch tags if git cache is present + if [ -e /home/circleci/project/.git ] + then + git fetch origin --tags + fi + - checkout + - run: + name: Compress git objects + command: git gc + - save_cache: + name: Git save cache + key: source-v2-{{ .Branch }}-{{ .Revision }} + paths: + - ".git" + bundle_install: + description: "Bundle install" + steps: + - restore_cache: + name: Bundle modules cache restore + keys: + - bundle-v1-{{ checksum "Gemfile" }} + - bundle-v1- + - run: + name: Bundle install + command: | + bundle install --path ./modules + - save_cache: + name: Bundle modules cache save + key: bundle-v1-{{ checksum "Gemfile" }} + paths: + - "modules" + build: + description: "Build Jekyll site" + steps: + - restore_cache: + name: "Build cache restore" + keys: + - _site-v1-{{ .Revision }} + - _site-v1- + - run: + name: Building Jekyll site + command: bundle exec jekyll build --incremental + - save_cache: + name: Build cache save + key: _site-v1-{{ .Revision }} + paths: + - _site + docker_build_push: + description: "Build Docker image" + parameters: + docker_image_latest_tag: + type: string + default: "latest-staging" + steps: + - setup_remote_docker + - run: + name: Building docker image + command: | + TAG=${CIRCLE_TAG:-$CIRCLE_SHA1} + docker build -t ${DOCKHUB_ORGANISATION}/binary-static-academy:${TAG} -t ${DOCKHUB_ORGANISATION}/binary-static-academy:<< parameters.docker_image_latest_tag >> . + - run: + name: Pushing Image to docker hub + command: | + TAG=${CIRCLE_TAG:-$CIRCLE_SHA1} + echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin + docker push ${DOCKHUB_ORGANISATION}/binary-static-academy:${TAG} + docker push ${DOCKHUB_ORGANISATION}/binary-static-academy:<< parameters.docker_image_latest_tag >> + k8s_deploy: + description: "Deploy to k8s cluster" + parameters: + k8s_version: + type: string + default: ${CIRCLE_SHA1} + k8s_namespace: + type: string + default: "academy-binary-com-staging" + steps: + - k8s/install-kubectl + - run: + name: Deploying to k8s cluster for service binary-academy + command: | + TAG=${CIRCLE_TAG:-$CIRCLE_SHA1} + export NAMESPACE=<< parameters.k8s_namespace >> + git clone https://github.com/binary-com/devops-ci-scripts + cd devops-ci-scripts/k8s-build_tools + echo $CA_CRT | base64 --decode > ca.crt + ./release.sh binary-static-academy << parameters.k8s_version >> ${TAG} + notify_slack: + description: "Notify slack" + steps: + - slack/status: + include_project_field: false + failure_message: "Release failed for Academy with version *$(cat _site/version)*" + success_message: "Release succeeded for Academy with version *$(cat _site/version)*" + webhook: ${SLACK_WEBHOOK} +jobs: + build: + docker: + - image: circleci/ruby:2.6.5 + steps: + - git_checkout_from_cache + - bundle_install + - build + release_staging: + docker: + - image: circleci/ruby:2.6.5 + steps: + - git_checkout_from_cache + - bundle_install + - build + - docker_build_push + #- k8s_deploy # devops will add staging k8s manifests + - notify_slack + release_production: + docker: + - image: circleci/ruby:2.6.5 + steps: + - git_checkout_from_cache + - bundle_install + - build + - docker_build_push: + docker_image_latest_tag: "latest" + - k8s_deploy: + k8s_namespace: "academy-binary-com-production" + - notify_slack +workflows: + build: + jobs: + - build: + filters: + branches: + ignore: /^master$/ + tags: + ignore: /.*/ + release: + jobs: + - release_staging: + filters: + branches: + only: /^master$/ + - release_production: + filters: + branches: + ignore: /.*/ + tags: + only: /^production.*/ + context: binary-frontend-artifact-upload + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 09382bd2b..8460c9ead 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,59 @@ +# Project # +################### +node_modules +dist +upload +deploy.log +package-lock.json +Gemfile.lock + +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Custom # +###################### +*.sass-cache* +.cache/ +.jekyll-cache/ _site -.sass-cache +/.idea +secrets.json .jekyll-metadata -CNAME -Gemfile.lock +.ruby-version +.vscode/* +CNAME \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 03b3c0e8f..000000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: ruby -rvm: - - 2.5.0 -branches: - only: - - master - - gh-pages -script: - - bundle exec jekyll build \ No newline at end of file diff --git a/404.html b/404.html index 1af7af8f6..af91b8237 100644 --- a/404.html +++ b/404.html @@ -18,107 +18,6 @@

The page you requested does not exist.

-
-
-
-
-

Featured videos

-
-
- -
- -
-
-
-
-
-
-
-

Recommended links

-
-
-
-
-
-
-

Webinars

-

Binary.com in collaboration with professional traders provides free training sessions for both beginners and advanced traders.

-

Read more

-
-
-
-
-
-
-

Binary.com Shop

-

Grab apps, strategies, guides, gear, and more from Binary.com and other third-party sellers.

-

Visit Shop

-
-
-
-
-
-
-

Binary TV

-

Firm believer of fundamental analysis? Keep up with headline news and trends from around the world.

-

Read more

-
-
-
-
-
-
-
-
-

E-Books

-

Check out our whole range of e-books and download your free trading guide to get started right away!

-

Read more

-
-
-
-
-
-
-

Daily Report

-

Stay up-to-date with the latest financial news and trends from around the world, with Daily Market Reports written by professional trader, Dave Evans.

-

Read more

-
-
-
-
-
-
-

Mellon on the Markets

-

Read through Jim Mellon's analysis of the global markets and learn how to determine whether you should or should not trade headline news driven events. Completely free of charge!

-

Read more

-
-
-
-
-
-
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..37c3a3fd1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx:alpine +COPY ./_site /usr/share/nginx/html +COPY ./academy.com.conf /etc/nginx/conf.d/default.conf diff --git a/Gemfile b/Gemfile index 694f817b7..b34760304 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,7 @@ source "https://rubygems.org" -ruby '2.5.0' -gem "jekyll", "3.8.4" +gem "jekyll", "4.0.0" group :jekyll_plugins do - gem "jekyll-feed", "~> 0.9.2" + gem "jekyll-feed" end diff --git a/README.md b/README.md index 327ca729b..43b625361 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ -## Binary Academy - -[![Build Status](https://travis-ci.org/binary-com/academy.svg?branch=gh-pages)](https://travis-ci.org/binary-com/academy) +# Binary Academy +## :warning: Deprecation notice +This repository is deprecated, it was used for [academy.binary.com](https://academy.binary.com) that is now deleted (end of 2022). +## README - Always add language to the permalink ( like this -> permalink: /en/some-text-for-prmalink } - - Why is this important? Blog is always listening url and looking for language value (/en/) in order to show correct language on the page for all elements (header, footer, sidebar..) diff --git a/_config.yml b/_config.yml index 35c36855e..d16c955f0 100644 --- a/_config.yml +++ b/_config.yml @@ -11,4 +11,7 @@ future: true markdown: kramdown exclude: - Gemfile - - Gemfile.lock \ No newline at end of file + - Gemfile.lock + - modules + - Dockerfile + - academy.com.conf diff --git a/_includes/footer.html b/_includes/footer.html index fab52e120..99a3e7695 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -29,15 +29,4 @@
- diff --git a/_includes/head.html b/_includes/head.html index fb23b305f..1c6c48f8e 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -28,5 +28,12 @@ ga('create', 'UA-40877026-11', 'auto'); ga('send', 'pageview'); + + + + \ No newline at end of file diff --git a/_includes/header.html b/_includes/header.html index 9acba2560..9c9ffc5cb 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -24,7 +24,6 @@
  • Deutsch
  • Español
  • Français
  • -
  • Indonesia
  • Italiano
  • Português
  • Русский
  • diff --git a/_includes/lang.html b/_includes/lang.html index d757a9679..34986c23f 100644 --- a/_includes/lang.html +++ b/_includes/lang.html @@ -5,7 +5,6 @@ {% elsif path contains "/fr/" %}{% assign siteLang = 'fr' %}{% assign LangUrl = '/fr/' %} {% elsif path contains "/es/" %}{% assign siteLang = 'es' %}{% assign LangUrl = '/es/' %} {% elsif path contains "/pt/" %}{% assign siteLang = 'pt' %}{% assign LangUrl = '/pt/' %} -{% elsif path contains "/id/" %}{% assign siteLang = 'id' %}{% assign LangUrl = '/id/' %} {% elsif path contains "/it/" %}{% assign siteLang = 'it' %}{% assign LangUrl = '/it/' %} {% else %} {% assign siteLang = 'en' %}{% assign LangUrl = '/en/' %} diff --git a/_includes/navs/footer/col-1.html b/_includes/navs/footer/col-1.html index dfd981f3d..ddc4631a4 100644 --- a/_includes/navs/footer/col-1.html +++ b/_includes/navs/footer/col-1.html @@ -1,7 +1,5 @@

    {{ translate.learning_center }}

    \ No newline at end of file diff --git a/_includes/navs/footer/col-2.html b/_includes/navs/footer/col-2.html index 214befbfe..bf336afbe 100644 --- a/_includes/navs/footer/col-2.html +++ b/_includes/navs/footer/col-2.html @@ -1,64 +1,65 @@ {% if siteLang == "en" %} -

    Videos

    +

    Shop

    {% elsif siteLang == "de" %} -

    Videos

    +

    Geschäft

    {% elsif siteLang == "fr" %} -

    Videos

    +

    Boutique

    {% elsif siteLang == "ru" %} -

    Видео

    +

    Магазин

    {% elsif siteLang == "es" %} -

    Videos

    +

    Tienda

    {% elsif siteLang == "pt" %} -

    Videos

    +

    Loja

    {% elsif siteLang == "id" %} -

    Video

    +

    Toko

    {% else %} -

    Videos

    +

    Shop

    {% endif %} \ No newline at end of file diff --git a/_includes/navs/footer/col-3.html b/_includes/navs/footer/col-3.html index bf336afbe..c88a2140b 100644 --- a/_includes/navs/footer/col-3.html +++ b/_includes/navs/footer/col-3.html @@ -1,65 +1,65 @@ {% if siteLang == "en" %} -

    Shop

    -