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

Migrate to Github Pages #277

Merged
merged 1 commit into from
Oct 6, 2023
Merged
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
58 changes: 58 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Deploy site to GH Pages

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install plantuml
run: sudo apt-get install -y plantuml

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
cache-version: 0

- name: Install gems
run: |
gem install bundler
bundle install --jobs 4 --retry 3

- name: Build site with Jekyll
run: |
bundle exec jekyll build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
4 changes: 2 additions & 2 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Jekyll site CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# pull_request:
# branches: [ main ]
workflow_dispatch:

jobs:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/pr_verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: PR verification

on:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install plantuml
run: sudo apt-get install -y plantuml

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
cache-version: 0

- name: Install gems
run: |
gem install bundler
bundle install --jobs 4 --retry 3

- name: Build site with Jekyll
run: |
bundle exec jekyll build
2 changes: 1 addition & 1 deletion .ruby-gemset
Original file line number Diff line number Diff line change
@@ -1 +1 @@
candlepinproject.org
candlepin.github.io
90 changes: 0 additions & 90 deletions .s2i/bin/assemble

This file was deleted.

42 changes: 0 additions & 42 deletions .s2i/bin/run

This file was deleted.

1 change: 0 additions & 1 deletion .s2i/environment

This file was deleted.

3 changes: 0 additions & 3 deletions .s2i/lib/plantuml

This file was deleted.

Binary file removed .s2i/lib/plantuml.jar
Binary file not shown.
34 changes: 15 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
FROM centos/ruby-27-centos7
FROM ruby:2.7-slim-bullseye

LABEL name="candlepin/website-ruby-27" \
maintainer="Alex Wood <[email protected]>"
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
graphviz \
plantuml \
python3 \
&& rm -rf /var/lib/apt/lists/*

USER root
COPY Gemfile* .
RUN bundle install && \
rm -rf Gemfile*

RUN yum install -y --setopt=tsflags=nodocs java-1.8.0-openjdk-devel graphviz python3 && \
yum clean all -y
EXPOSE 4000

# Keep this value up to date with the BUNDLED WITH version in Gemfile.lock
RUN gem install bundler:2.3.10
WORKDIR /site

COPY ./.s2i/lib/plantuml.jar /usr/share/java/plantuml.jar
COPY ./.s2i/lib/plantuml /usr/bin/plantuml
RUN chmod 755 /usr/bin/plantuml

COPY ./.s2i/bin/ $STI_SCRIPTS_PATH

# Drop the root user and make the content of /opt/app-root owned by user 1001
RUN chown -R 1001:0 ${APP_ROOT} && chmod -R ug+rwx ${APP_ROOT} && \
rpm-file-permissions

USER 1001
ENTRYPOINT [ "jekyll" ]

CMD [ "--help" ]
16 changes: 0 additions & 16 deletions Dockerfile.dev

This file was deleted.

4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,5 @@ gem 'jekyll-plantuml'
gem 'jekyll-sitemap'
gem 'kramdown', ">= 2.3.0"
gem 'kramdown-parser-gfm'
gem 'rack-jekyll', :git => 'https://github.com/awood/rack-jekyll'
gem 'pygments.rb'
gem 'stringex'
gem 'rack', "~> 2.2"
gem 'rack-rewrite'
gem 'puma'
18 changes: 0 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
GIT
remote: https://github.com/awood/rack-jekyll
revision: 86f35d8dde12a1d4dc4964dbaf4de766a538b98b
specs:
rack-jekyll (0.5.0)
jekyll (>= 1.3)
listen (>= 1.3)
rack (~> 2.0)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -59,15 +50,10 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
nio4r (2.5.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
puma (5.6.7)
nio4r (~> 2.0)
pygments.rb (2.2.0)
rack (2.2.6.4)
rack-rewrite (1.5.1)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand Down Expand Up @@ -97,11 +83,7 @@ DEPENDENCIES
jekyll-sitemap
kramdown (>= 2.3.0)
kramdown-parser-gfm
puma
pygments.rb
rack (~> 2.2)
rack-jekyll!
rack-rewrite
stringex
typogruby

Expand Down
Loading