Skip to content

Commit

Permalink
Migrate to Github Pages
Browse files Browse the repository at this point in the history
- Add PR verification workflow
- Add deploy workflow
  • Loading branch information
Ondrej Janus committed Oct 3, 2023
1 parent 6cb7c19 commit 5f3f44a
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 30 deletions.
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
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Build Status](https://github.com/candlepin/candlepinproject.org/actions/workflows/jekyll.yml/badge.svg?branch=main)
![Build Status](https://github.com/candlepin/candlepin.github.io/actions/workflows/jekyll.yml/badge.svg?branch=main)

# Getting Started
## Container Development (Easy Mode)
Expand Down Expand Up @@ -234,7 +234,7 @@ you'll need to import the image initially using `oc import-image
candlepin/website-ruby-27:latest` (Replace website-ruby-27 with whatever your
new tag is).

Then create your application with `oc new-app candlepin/website-ruby-27~https://github.com/candlepin/candlepinproject.org` or you can use the web console if you want.
Then create your application with `oc new-app candlepin/website-ruby-27~https://github.com/candlepin/candlepin.github.io` or you can use the web console if you want.

# Environment Variables and Build and Run Processes
Any environment variables that we need to define (such as the BUNDLE_WITHOUT
Expand Down
2 changes: 1 addition & 1 deletion docs/candlepin/documentation_authoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Documentation
# Candlepin Documentation
Candlepin documentation is split into three major pieces. A Jekyll based web site [http://candlepinproject.org/](http://candlepinproject.org/), JavaDoc that is currently only in the source code and REST API that is being hosted on [http://candlepinproject.org/](http://candlepinproject.org/) and is auto-generated by so called API Crawler (Java project in server's code base)

When you need to submit new documentation, you should clone sources of the site from [Github repo](https://github.com/candlepin/candlepinproject.org) and issue a Pull Request. After your pull request is merged, the new site content is automatically published to [http://candlepinproject.org/](http://candlepinproject.org/)
When you need to submit new documentation, you should clone sources of the site from [Github repo](https://github.com/candlepin/candlepin.github.io) and issue a Pull Request. After your pull request is merged, the new site content is automatically published to [http://candlepinproject.org/](http://candlepinproject.org/)

While preparing the Pull Request with changes to the documentation you should use local Jekyll instance to see your changes to the documentation. See README.md file in site's sources.

Expand Down
2 changes: 1 addition & 1 deletion presentations/junit-5/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<noscript>
This presentation requires JavaScript. If you're not able
to use JavaScript, you can still view the source files
<a href="https://github.com/candlepin/candlepinproject.org/tree/main/presentations/junit-5">here</a>.
<a href="https://github.com/candlepin/candlepin.github.io/tree/main/presentations/junit-5">here</a>.
</noscript>

<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion presentations/pki-crash-course/4-conclusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ should never ignore these if the appear on a site that you don't have control ov
# Questions ?

Suggestions and corrections: <!-- .element class="caption" -->
https://github.com/candlepin/candlepinproject.org/issues
https://github.com/candlepin/candlepin.github.io/issues
2 changes: 1 addition & 1 deletion presentations/pki-crash-course/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<noscript>
This presentation requires JavaScript. If you're not able
to use JavaScript, you can still view the source files
<a href="https://github.com/candlepin/candlepinproject.org/tree/main/presentations/pki-crash-course">here</a>.
<a href="https://github.com/candlepin/candlepin.github.io/tree/main/presentations/pki-crash-course">here</a>.
</noscript>

<script type="text/javascript">
Expand Down

0 comments on commit 5f3f44a

Please sign in to comment.