Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mucking about #1809

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .dockerignore

This file was deleted.

37 changes: 3 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,24 @@ jobs:
uses: actions/checkout@v2
with:
persist-credentials: false # needed for JamesIves/github-pages-deploy-action

- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.4
- name: Cache Ruby gems
id: cache-gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-1-${{ hashFiles('Gemfile.lock') }}
- name: Set Ruby gems directory
run: bundle config path vendor/bundle
- name: Install Ruby gems
# if: steps.cache-gems.outputs.cache-hit != 'true'
run: bundle install --jobs 4 --retry 3 --deployment

- name: Install Node
uses: actions/setup-node@v2
with:
node-version: '10' # gulp will likely be upset with newer
- name: Cache node_modules
id: cache-node
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
- name: Install NPM packages
if: steps.cache-node.outputs.cache-hit != 'true'
run: npm install

- name: Cache Bower libraries
id: cache-bower
uses: actions/cache@v2
with:
path: lib
key: ${{ runner.os }}-bower-${{ hashFiles('bower.json') }}
- name: Install Bower packages
if: steps.cache-bower.outputs.cache-hit != 'true'
run: node_modules/.bin/bower install

- name: Cache SmugMug
id: cache-smugmug
Expand All @@ -67,27 +45,18 @@ jobs:
mkdir -p tmp
wget https://nthp.s3-eu-west-1.amazonaws.com/sm-cache.tar.xz -O tmp/sm-cache.tar.xz
tar xvf tmp/sm-cache.tar.xz
- name: Build
run: ./_bin/install

- name: Store build number
run: echo -n $(($GITHUB_RUN_NUMBER + 10000)) > _includes/travis_build_number.txt

- name: Build the site
run: node_modules/.bin/gulp build_deploy
run: docker-compose exec -T app npm run gulp:deploy
env:
SMUGMUG_API_KEY: ${{ secrets.SMUGMUG_API_KEY }}
SMUGMUG_CACHE_MAINTAIN: true

- name: Cache htmltest files
uses: actions/cache@v2
with:
path: tmp/htmltest
key: htmltest-1
- name: Test built site with htmltest
uses: wjdp/htmltest-action@master
continue-on-error: true
with:
skip_external: true

- name: Publish to GH Pages 🚀
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: JamesIves/[email protected]
Expand Down
39 changes: 0 additions & 39 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ DEPENDENCIES
octokit (~> 4.8.0)

BUNDLED WITH
1.17.3
2.1.2
9 changes: 9 additions & 0 deletions _bin/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env sh

docker-compose down -v
docker-compose build --no-cache
docker-compose up -d --remove-orphans
docker-compose exec -T app bundle install
docker-compose exec -T app npm install
docker-compose exec -T app npm run bower:install
docker-compose exec -T app npm run gulp:build
Empty file modified _bin/person_list_generator.py
100644 → 100755
Empty file.
6 changes: 6 additions & 0 deletions _bin/serve
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh

docker-compose exec app \
bundle exec jekyll server \
--host 0.0.0.0 \
--port 8000
Empty file modified _bin/stub_maker.py
100644 → 100755
Empty file.
25 changes: 25 additions & 0 deletions _docker/app.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ARG RUBY_VERSION=2.4.10
ARG NODE_VERSION=10.16.0

FROM ruby:${RUBY_VERSION}

WORKDIR /app

COPY . .

RUN bundle config path vendor/bundle

RUN gem install bundler -v 2.3.27 \
&& bundle install

RUN apt-get -y update \
&& apt-get -y upgrade

# I hate this.

RUN apt-get -y install npm

RUN npm cache clean -f

RUN npm install -g n \
&& n 10.16.0
3 changes: 0 additions & 3 deletions assets/for_shows/final-act-2014-soundtrack.zip

This file was deleted.

3 changes: 0 additions & 3 deletions assets/for_shows/mark_shelley_s_frankenstein_script.docx

This file was deleted.

3 changes: 0 additions & 3 deletions assets/for_shows/wild-west-end-soundtrack.zip

This file was deleted.

23 changes: 23 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: '3'

services:
app:
platform: linux/x86_64
build:
context: .
dockerfile: _docker/app.dockerfile
volumes:
- "./:/app"
ports:
- "8000:8000"
networks:
- website-network
entrypoint: tail -f /dev/null
environment:
EXECJS_RUNTIME: Disabled

networks:
website-network:
driver: bridge


5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,10 @@
},
"bugs": {
"url": "https://github.com/newtheatre/history-project/issues"
},
"scripts": {
"bower:install": "bower install --allow-root",
"gulp:deploy": "gulp build_deploy",
"gulp:build": "gulp build"
}
}
Loading