Skip to content

Commit

Permalink
Get microsite publishing
Browse files Browse the repository at this point in the history
- Add Makefile "publish" target
- Use docs/ghpagesPushSite for publishing (needed for API)
- Fix CSS issues due to bad base url
- Fix missing font resources
- Add v3.0.0 Chisel API docs

Signed-off-by: Schuyler Eldridge <[email protected]>
  • Loading branch information
seldridge committed Aug 4, 2019
1 parent 2876fc8 commit d1be0a6
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ build

travis-deploy-key
travis-deploy-key.pub

test_run_dir
*.anno.json
*.v
*.fir
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ branches:
only:
- master

before_script:
- git config --global user.email "[email protected]"
- git config --global user.name "ucb-bar-jenkins"
- git config --global push.default simple

jobs:
include:
- stage: "legacy chisel apis"
Expand All @@ -48,5 +53,5 @@ jobs:
- gem install sass
- gem install jekyll -v 3.8.5
- make
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then bash scripts/publishMicrosite.sh; fi
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then make publish; fi
- if [ "$TRAVIS_PULL_REQUEST" = "true" ]; then echo "Not in master branch, skipping deploy and release"; fi
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ api-copy = \
$(treadleTags:%=docs/target/site/api/treadle/%/index.html) \
$(diagrammerTags:%=docs/target/site/api/diagrammer/%/index.html)

.PHONY: all clean mrproper serve \
.PHONY: all clean mrproper publish serve \
apis-chisel apis-firrtl apis-chisel-testers apis-treadle apis-diagrammer
.PRECIOUS: \
$(subprojects)/chisel3/%/.git $(subprojects)/chisel3/%/target/scala-$(scalaVersion)/unidoc/index.html \
Expand Down Expand Up @@ -66,6 +66,10 @@ clean:
mrproper:
rm -rf $(buildDir) target project/target firrtl/target treadle/target diagrammer/target

# Publish Microsite
publish: all
sbt ++$(scalaVersion).$(scalaMinorVersion) docs/ghpagesPushSite

# Start a Jekyll server for the site
serve: all
(cd docs/target/site && jekyll serve)
Expand Down
15 changes: 8 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,19 @@ val technologies: String =
| - third: ["FIRRTL", "The FIRRTL circuit compiler starts after Chisel and enables backend (FPGA, ASIC, technology) specialization, automated circuit transformation, and Verilog generation."]
|""".stripMargin

lazy val docsMappingsAPIDir = settingKey[String]("Name of subdirectory in site target directory for api docs")

lazy val micrositeSettings = Seq(
scalaVersion := "2.12.6",
micrositeName := "Chisel/FIRRTL",
micrositeDescription := "Chisel/FIRRTL\nHardware Compiler Framework",
micrositeUrl := "https://chisel.eecs.berkeley.edu",
micrositeUrl := "https://freechipsproject.github.io/www.chisel-lang.org",
micrositeBaseUrl := "www.chisel-lang.org",
micrositeAuthor := "the Chisel/FIRRTL Developers",
micrositeTwitter := "@chisel_lang",
micrositeGithubOwner := "freechipsproject",
micrositeGithubRepo := "chisel3",
micrositeGithubLinks := false,
micrositeShareOnSocial := false,
micrositeDocumentationUrl := "api/chisel3/latest",
micrositeDocumentationUrl := "api/chisel3/latest/",
micrositeDocumentationLabelDescription := "API Documentation",
/* mdoc doesn't work with extraMDFiles so this is disabled for now */
// micrositeCompilingDocsTool := WithMdoc,
Expand Down Expand Up @@ -87,16 +86,18 @@ lazy val micrositeSettings = Seq(
"gray-lighter" -> "#F4F3F4",
"white-color" -> "#FFFFFF"),
autoAPIMappings := true,
docsMappingsAPIDir := "api/chisel3",
ghpagesNoJekyll := false,
scalacOptions in (ScalaUnidoc, unidoc) ++= Seq(
"-groups",
"-sourcepath",
baseDirectory.in(LocalRootProject).value.getAbsolutePath,
"-diagrams"
),
git.remoteRepo := "[email protected]:freechipsproject/chisel3.git",
includeFilter in makeSite := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.yml" | "*.md" | "*.svg",
ghpagesRepository := file("build/gh-pages"),
ghpagesBranch := "gh-pages",
git.remoteRepo := "[email protected]:freechipsproject/www.chisel-lang.org.git",
includeFilter in makeSite := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.yml" | "*.md" |
"*.svg" | "*.woff" | "*.ttf",
includeFilter in Jekyll := (includeFilter in makeSite).value
)

Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/resources/microsite/data/menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ options:
url: api/chisel3/v3.0.2/index.html
- title: v3.0.1
url: api/chisel3/v3.0.1/index.html
- title: v3.0.0
url: api/chisel3/v3.0.0/index.html

# Testers Site
- title: Testers
Expand Down
17 changes: 0 additions & 17 deletions scripts/publishMicrosite.sh

This file was deleted.

0 comments on commit d1be0a6

Please sign in to comment.