diff --git a/.circleci/config.yml b/.circleci/config.yml index 92e203bf..64e680ac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -91,6 +111,34 @@ release: &release name: Release artifacts command: ./sbt ++${SCALA_VERSION}! releaseEarly +microsite: µsite + 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 @@ -127,6 +175,12 @@ jobs: - <<: *scala_212 - <<: *jdk_8 + microsite: + <<: *microsite + <<: *machine_ubuntu + environment: + - <<: *jdk_8 + workflows: version: 2 build: @@ -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-]+)*))?$/ diff --git a/website/siteConfig.js b/website/siteConfig.js index 8790665a..10197110 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -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: [ @@ -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`, @@ -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;