Skip to content

Commit ba208ee

Browse files
committed
Github pages, absolute Dockerfile workspace path.
1 parent 938c89a commit ba208ee

2 files changed

Lines changed: 70 additions & 5 deletions

File tree

.github/workflows/pages.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+
name: Deploy to Pages
8+
9+
on:
10+
# Runs on pushes targeting the default branch
11+
push:
12+
branches: ["master"]
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
28+
29+
jobs:
30+
# Build job
31+
build:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Setup Ruby
37+
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
38+
with:
39+
ruby-version: '3.1' # Not needed with a .ruby-version file
40+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
41+
cache-version: 0 # Increment this number if you need to re-download cached gems
42+
- name: Setup Pages
43+
id: pages
44+
uses: actions/configure-pages@v5
45+
with:
46+
base_path: "public"
47+
- name: Build documentation
48+
run: bundle exec rake documentation:build
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: "public"
53+
54+
# Deployment job
55+
deploy:
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
runs-on: ubuntu-latest
60+
needs: build
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Org-ruby Dockerfile
22
FROM ruby:alpine
33

4-
RUN mkdir org-ruby
5-
COPY Gemfile org-ruby/Gemfile
6-
COPY org-ruby.gemspec org-ruby/org-ruby.gemspec
7-
COPY lib/org-ruby/version.rb org-ruby/lib/org-ruby/version.rb
4+
# Development tools like: flog
5+
RUN mkdir /org-ruby
6+
COPY Gemfile /org-ruby/Gemfile
7+
COPY org-ruby.gemspec /org-ruby/org-ruby.gemspec
8+
COPY lib/org-ruby/version.rb /org-ruby/lib/org-ruby/version.rb
89

910
# Ensure gems are installed on a persistent volume and available as bins
1011
# Make the folder world writable to let the default user install the gems
@@ -13,7 +14,7 @@ VOLUME /bundle
1314
ENV BUNDLE_PATH='/bundle'
1415
ENV PATH="/bundle/ruby/$RUBY_VERSION/bin:${PATH}"
1516

16-
WORKDIR org-ruby
17+
WORKDIR /org-ruby
1718
RUN bundle install
1819

1920
# Run this on changes

0 commit comments

Comments
 (0)