Skip to content

Commit

Permalink
Publish microsite (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
mijicd authored Aug 19, 2019
1 parent 768b3f8 commit aef056f
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 41 deletions.
64 changes: 64 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@ save_cache: &save_cache
- "~/.m2"
- "~/website/node_modules"

install_yarn: &install_yarn
- run:
name: Install Yarn
command: |
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
sudo bash -c 'echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list'
sudo apt update && sudo apt install yarn -y
yarn policies set-version
yarn -v
install_nodejs: &install_nodejs
- run:
name: Install node.js
command: |
export NVM_DIR="/opt/circleci/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install
nvm use
node -v
compile: &compile
steps:
- checkout
Expand Down Expand Up @@ -91,6 +111,34 @@ release: &release
name: Release artifacts
command: ./sbt ++${SCALA_VERSION}! releaseEarly

microsite: &microsite
steps:
- add_ssh_keys:
fingerprints:
- "b3:9b:af:d5:de:74:32:e7:7a:21:77:77:66:fe:2f:42"
- checkout
- <<: *load_cache
- <<: *install_nodejs
- <<: *install_yarn
- run:
name: Publishing website
command: |
git config --global user.email "${GH_NAME}@users.noreply.github.com"
git config --global user.name "${GH_NAME}"
export GIT_USER=${GH_NAME}
export TRAVIS_BUILD_NUMBER="${CIRCLE_BUILD_NUM}"
export TRAVIS_COMMIT="${CIRCLE_SHA1}"
sudo chown -R $USER:$USER /tmp
export NVM_DIR="/opt/circleci/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install
nvm use
node -v
./sbt zioNio/doc
./sbt docs/docusaurusCreateSite
./sbt docs/docusaurusPublishGhpages
- <<: *save_cache

jobs:
lint:
<<: *lint
Expand Down Expand Up @@ -127,6 +175,12 @@ jobs:
- <<: *scala_212
- <<: *jdk_8

microsite:
<<: *microsite
<<: *machine_ubuntu
environment:
- <<: *jdk_8

workflows:
version: 2
build:
Expand Down Expand Up @@ -163,3 +217,13 @@ workflows:
ignore: /.*/
tags:
only: /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/

- microsite:
context: Website
requires:
- release_212
filters:
branches:
ignore: /.*/
tags:
only: /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
59 changes: 18 additions & 41 deletions website/siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,25 @@

// List of projects/orgs using your project for the users page.
const users = [
{
caption: 'User1',
// You will need to prepend the image path with your baseUrl
// if it is not '/', like: '/test-site/img/image.jpg'.
image: '/img/undraw_open_source.svg',
infoLink: 'https://www.facebook.com',
pinned: true,
},
// {
// caption: 'User1',
// // You will need to prepend the image path with your baseUrl
// // if it is not '/', like: '/test-site/img/image.jpg'.
// image: '/img/undraw_open_source.svg',
// infoLink: 'https://www.facebook.com',
// pinned: true,
// },
];

const siteConfig = {
title: 'ZIO NIO',
tagline: 'A small, unopinionated ZIO interface to NIO',
url: 'https://github.com/zio/zio-nio',
baseUrl: '/', // Base URL for your project */
// For github.io type URLs, you would set the url and baseUrl like:
// url: 'https://facebook.github.io',
// baseUrl: '/test-site/',
url: 'https://zio.github.io',
baseUrl: '/zio-nio/', // Base URL for your project */

// Used for publishing and more
projectName: 'test-site',
organizationName: 'facebook',
// For top-level user or org sites, the organization is still the same.
// e.g., for the https://JoelMarcey.github.io site, it would be set like...
// organizationName: 'JoelMarcey'
projectName: 'zio-nio',
organizationName: 'zio',

// For no header links in the top nav bar -> headerLinks: [],
headerLinks: [
Expand All @@ -56,20 +50,6 @@ const siteConfig = {
secondaryColor: '#000000',
},

/* Custom fonts for website */
/*
fonts: {
myFont: [
"Times New Roman",
"Serif"
],
myOtherFont: [
"-apple-system",
"system-ui"
]
},
*/

// This copyright info is used in /core/Footer.js and blog RSS/Atom feeds.
copyright: `Copyright © ${new Date().getFullYear()} ZIO Maintainers`,

Expand All @@ -86,23 +66,20 @@ const siteConfig = {
// No .html extensions for paths.
cleanUrl: true,

// Open Graph and Twitter card images.
ogImage: 'img/undraw_online.svg',
twitterImage: 'img/undraw_tweetstorm.svg',

// For sites with a sizable amount of content, set collapsible to true.
// Expand/collapse the links and subcategories under categories.
// docsSideNavCollapsible: true,

// Show documentation's last contributor's name.
// enableUpdateBy: true,
enableUpdateBy: true,

// Show documentation's last update time.
// enableUpdateTime: true,
enableUpdateTime: true,

// You may provide arbitrary config keys to be used as needed by your
// template. For example, if you need your repo's URL...
// repoUrl: 'https://github.com/facebook/test-site',
scrollToTop: true,
scrollToTopOptions: {
cornerOffset: 100,
},
};

module.exports = siteConfig;

0 comments on commit aef056f

Please sign in to comment.