Skip to content

Commit

Permalink
Deploy to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
CA Civic Lab deploy script committed Apr 9, 2024
0 parents commit d413bcc
Show file tree
Hide file tree
Showing 846 changed files with 236,947 additions and 0 deletions.
105 changes: 105 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
bundle-cache-key: &bundle-cache-key
v1-bundle-{{ checksum "Gemfile.lock" }}

npm-cache-key: &npm-cache-key
v1-npm-{{ checksum "package-lock.json" }}

deploy-workflow-jobs: &deploy-workflow-jobs
- build:
filters:
branches:
ignore:
- gh-pages
- deploy:
requires:
- build
filters:
branches:
only: master


version: 2
jobs:
build:
docker:
- image: cimg/ruby:2.7-node
steps:
- checkout
- restore_cache:
keys:
- *bundle-cache-key
- run:
name: Configure Bundler # use bundler version in Gemfile.lock
command: |
BUNDLER_VERSION=$(tail -1 Gemfile.lock | tr -d " ")
gem install bundler -v "$BUNDLER_VERSION"
- run:
name: Bundle Install
command: bundle check || bundle install --path vendor/bundle
- save_cache:
key: *bundle-cache-key
paths:
- vendor/bundle
- restore_cache:
keys:
- *npm-cache-key
- run:
name: npm install
command: npm install
- save_cache:
key: *npm-cache-key
paths:
- node_modules
- run:
name: Clone finance data repo
command: git clone https://github.com/caciviclab/disclosure-backend-static.git
working_directory: ..
- run:
name: Clean data folder
command: make clean
- run:
name: Pull finance data
command: make pull-finance
- run:
name: Build production
command: make production
- run:
name: Test
command: make test
# Saves the build files so they can be recalled in other jobs
- persist_to_workspace:
root: .
paths:
- _site

deploy:
docker:
- image: cimg/ruby:2.7-node
environment:
GITHUB_REPO: caciviclab/odca-jekyll
steps:
- checkout
- add_ssh_keys:
fingerprints:
- "84:e6:5d:fd:1d:8c:53:18:7e:0e:3e:ba:82:49:38:ca"
- attach_workspace:
at: .
- deploy:
name: Deploy to GH pages
command: _bin/deploy.sh


workflows:
version: 2
commit:
jobs: *deploy-workflow-jobs

twice-daily:
triggers:
- schedule:
cron: "0 0,12 * * *"
filters:
branches:
only:
- master
jobs: *deploy-workflow-jobs
141 changes: 141 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Open Disclosure Oakland | We provide transparent, non-partisan campaign contribution and expenditure data in an accessible and easy to understand format. We hope this site will engage the voting public and raise awareness and accountability. Ultimately, this is one step toward shifting politics into a movement of civic engagement and ultimate citizen action.</title>
<meta name="generator" content="Jekyll v3.8.7" />
<meta property="og:title" content="Open Disclosure Oakland" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="We provide transparent, non-partisan campaign contribution and expenditure data in an accessible and easy to understand format. We hope this site will engage the voting public and raise awareness and accountability. Ultimately, this is one step toward shifting politics into a movement of civic engagement and ultimate citizen action." />
<meta property="og:description" content="We provide transparent, non-partisan campaign contribution and expenditure data in an accessible and easy to understand format. We hope this site will engage the voting public and raise awareness and accountability. Ultimately, this is one step toward shifting politics into a movement of civic engagement and ultimate citizen action." />
<link rel="canonical" href="https://www.opendisclosure.io/404.html" />
<meta property="og:url" content="https://www.opendisclosure.io/404.html" />
<meta property="og:site_name" content="Open Disclosure Oakland" />
<script type="application/ld+json">
{"description":"We provide transparent, non-partisan campaign contribution and expenditure data in an accessible and easy to understand format. We hope this site will engage the voting public and raise awareness and accountability. Ultimately, this is one step toward shifting politics into a movement of civic engagement and ultimate citizen action.","@type":"WebPage","headline":"Open Disclosure Oakland","url":"https://www.opendisclosure.io/404.html","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7.3.1/themes/algolia-min.css" integrity="sha256-HB49n/BZjuqiCtQQf49OdZn63XuKFaxcIHWf0HNKte8=" crossorigin="anonymous">
<link rel="stylesheet" href="/assets/odca.css">
<link rel="icon" href="/assets/images/open-disclosure-favicon.ico" type="images/x-icon"/>
<link type="application/atom+xml" rel="alternate" href="https://www.opendisclosure.io/feed.xml" title="Open Disclosure Oakland" />

<script>
if(!(window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1")) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-50973042-1', 'auto');
ga('send', 'pageview');
}
</script>



</head>


<body>

<header class="header grid" role="banner">

<div class="header__wrapper grid-col-12">


<a class="header__title header__title--md" rel="author" href="/" tabindex="1">Open Disclosure Oakland</a>


<nav class="header-nav">
<input type="checkbox" id="header-nav-trigger" class="header-nav__trigger" />
<label for="header-nav-trigger">
<span class="header-nav__menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path fill="#FFFFFF" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
<path fill="#FFFFFF" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
<path fill="#FFFFFF" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
</svg>
</span>
</label>
<div class="header-nav__items">
<a class="header-nav__link-item" href="/search/">Search</a>
<a class="header-nav__link-item" href="/press/">Press</a>
<a class="header-nav__link-item" href="/about/">About</a>
<a class="header-nav__link-item" href="/faq/">FAQ</a>
</div>
</nav>
<a class="header__title" rel="author" href="/">ODOAK</a>

</div>
</header>


<main class="main" aria-label="Content">
<div class="main__wrapper">
<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>

</div>
</main>

<footer class="footer grid">
<div class="footer__wrapper grid-col-12">
<div class="footer__content grid--full">
<div class="footer__col footer__left-col grid-col-8">
<div class="footer__top-content">
<h2 class="footer__heading"><a class="brand" href="/">Open<span class="brand__em">Disclosure</span><span class="brand__light"> Oakland</span></a></h2>
<ul class="footer__nav">
<li class="footer__nav-item"><a href="/about/">About</a></li>
<li class="footer__nav-item"><a href="/press/">Press</a></li>
<li class="footer__nav-item"><a href="/faq/">FAQ</a></li>
<li class="footer__nav-item"><a href="https://openoakland.org/">Join us</a></li>
<li class="footer__nav-item"><a href="https://github.com/caciviclab/odca-jekyll#license">Open source</a></li>
<li class="footer__nav-item"><a href="https://registertovote.ca.gov/">Register to vote</a></li>
</ul>
</div>
<div class="footer__bottom-content">
<h5 class="tagline">Brought to you by
<span class="tagline__em"><a href="https://openoakland.org/">Open Oakland</a></span>
and
<span class="tagline__em"><a href="https://www.oaklandca.gov/boards-and-commissions/public-ethics-commission">Oakland’s Public Ethics Commission</a></span>
</h5>
<h6 class="footer__stipulation">Campaign finance data provided by the City of Oakland Public Ethics Commission <a href="http://nf4.netfile.com/pub2/Default.aspx?aid=COAK">Public Portal for Campaign Finance and Lobbyist Disclosure</a>. Candidate and ballot measure information gathered from information provided to the Alameda County Registrar of Voters by the City of Oakland.</h6>
</div>
</div>
<div class="footer__col grid-col-4">
<div class="footer__voters-edge-widget">
<iframe title='Enter your address for personalized voting information' src='https://votersedge.org/en/address-widget' frameBorder='0' scrolling='no' style='width:240px;height:198px;'></iframe>
</div>
</div>
</div>

</div>

</footer>

<script src="/assets/js/bundle.js" charset="utf-8"></script>
</body>

</html>
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
www.opendisclosure.io
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM jekyll/jekyll:3.8

WORKDIR /app
RUN chmod -R 777 /app

# Install dependencies. Structured this way to leverage layer caching
COPY ./Gemfile /app/Gemfile
COPY ./Gemfile.lock /app/Gemfile.lock
RUN bundle install

COPY ./package.json /app/package.json
COPY ./package-lock.json /app/package-lock.json
RUN npm install

COPY . /app

CMD npm run build && make serve-docker
Loading

0 comments on commit d413bcc

Please sign in to comment.