Skip to content

Commit

Permalink
feat: add ci and embed map
Browse files Browse the repository at this point in the history
  • Loading branch information
awadell1 committed Nov 8, 2023
1 parent e08e59e commit a2e99a8
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 26 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ name: Deploy Jekyll with GitHub Pages dependencies preinstalled
on:
# Runs on pushes targeting the default branch
push:
branches:
- main
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -34,17 +33,21 @@ jobs:
working-directory: ./docs
bundler-cache: true
- name: Build with Jekyll
run: bundle exec jekyll build
run: make build
working-directory: ./docs
env:
JEKYLL_ENV: production
- name: Check Site
run: make test
working-directory: ./docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./docs/_site/

# Deployment job
deploy:
if: ${{ github.ref == 'refs/heads/main' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
2 changes: 2 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

gem "webrick", "~> 1.8"

gem "html-proofer", "~> 5.0"
45 changes: 45 additions & 0 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,27 +1,52 @@
GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.1.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
afm (0.2.2)
async (2.6.5)
console (~> 1.10)
fiber-annotation
io-event (~> 1.1)
timers (~> 4.1)
base64 (0.1.1)
colorator (1.1.0)
concurrent-ruby (1.2.2)
console (1.23.2)
fiber-annotation
fiber-local
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
faraday (2.7.11)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
ffi (1.16.3)
fiber-annotation (0.2.0)
fiber-local (1.0.0)
forwardable-extended (2.6.0)
google-protobuf (3.24.4-arm64-darwin)
google-protobuf (3.24.4-x86_64-linux)
hashery (2.1.2)
html-proofer (5.0.8)
addressable (~> 2.3)
async (~> 2.1)
nokogiri (~> 1.13)
pdf-reader (~> 2.11)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
zeitwerk (~> 2.5)
http_parser.rb (0.8.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-event (1.3.3)
jekyll (4.3.2)
addressable (~> 2.4)
colorator (~> 1.0)
Expand Down Expand Up @@ -67,17 +92,30 @@ GEM
jekyll-include-cache (~> 0.1)
jekyll-paginate (~> 1.1)
jekyll-sitemap (~> 1.3)
nokogiri (1.15.4-arm64-darwin)
racc (~> 1.4)
nokogiri (1.15.4-x86_64-linux)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
pdf-reader (2.11.0)
Ascii85 (~> 1.0)
afm (~> 0.2.1)
hashery (~> 2.0)
ruby-rc4
ttfunk
public_suffix (5.0.3)
racc (1.7.3)
rainbow (3.1.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.6)
rouge (4.2.0)
ruby-rc4 (0.1.5)
ruby2_keywords (0.0.5)
safe_yaml (1.0.5)
sass-embedded (1.69.4-arm64-darwin)
Expand All @@ -89,14 +127,21 @@ GEM
faraday (>= 0.17.3, < 3)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
timers (4.3.5)
ttfunk (1.7.0)
typhoeus (1.4.0)
ethon (>= 0.9.0)
unicode-display_width (2.5.0)
webrick (1.8.1)
yell (2.2.2)
zeitwerk (2.6.12)

PLATFORMS
arm64-darwin-22
x86_64-linux

DEPENDENCIES
html-proofer (~> 5.0)
http_parser.rb (~> 0.6.0)
jekyll (~> 4.3.2)
jekyll-feed (~> 0.12)
Expand Down
10 changes: 10 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all: install build test

install:
bundle install

build:
bundle exec jekyll build

test: build
bundle exec htmlproofer --disable-external --ignore-missing-alt --swap-urls '^/evse-scaling-behavior/:/' _site
2 changes: 1 addition & 1 deletion docs/_data/navigation.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
main:
- title: Paper
url: https://doi.org/10.1093/pnasnexus/pgad341
- title: Predictions
- title: Interactive Map
url: map.html
- title: "Code"
url: https://github.com/BattModels/evse-scaling-behavior
Expand Down
18 changes: 0 additions & 18 deletions docs/_layouts/map.html

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ We need a simple, robust framework for estimating infrastructure needs and evalu
Using [Urban Scaling Theory][scale], we've estimated the number of charging stations needed to reach parity[^2] with gasoline stations and created [an interactive map of our estimates][map].
For example, in Washtenaw County, Michigan[^3], we estimate an 83-fold increase in charging infrastructure is needed.

We've published our [paper] as an Open Access brief report on PNAS Nexus, and have publicly released a [dataset of our predictions and the input datasets](dataset).
We've published our [paper] as an Open Access brief report on PNAS Nexus, and have publicly released a [dataset of our predictions and the input datasets][dataset].


[scale]: https://www.ted.com/talks/geoffrey_west_the_surprising_math_of_cities_and_corporations?utm_campaign=tedspread&utm_medium=referral&utm_source=tedcomshare
Expand Down
5 changes: 2 additions & 3 deletions docs/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
layout: default
---
<link rel="stylesheet" href="{% link assets/css/map.css %}">
<div class="map-container">
<div id="main" class="map-container">
<iframe src="{% link raw_map.html %}" width="100%" title="Scale-Adjusted EVSE Station Gap" class="map-row">
Your browser doesn't support inline frames
</iframe>
</div>
<div>
</div /div>>

0 comments on commit a2e99a8

Please sign in to comment.