diff --git a/Makefile b/Makefile index b4284b8..d485b61 100644 --- a/Makefile +++ b/Makefile @@ -11,12 +11,8 @@ submodules: update-submodules update-submodules: git submodule update --init --remote --recursive -# Running locally -# -# git clone ssh://git@github.com/github/pages-gem -# cd pages-gem/ -# make image + +run: + docker run --rm -it -v $(shell pwd):/src/site -p4000:4000 gh-pages sh -c "bundle add webrick && bundle install && jekyll serve -H 0.0.0.0 -P 4000" + # -# cd homepage/ (this repository) -# docker run --rm -it -v .:/src/site -p4000:4000 --security-opt label=disable gh-pages -# \ No newline at end of file diff --git a/__build/Dockerfile b/__build/Dockerfile new file mode 100644 index 0000000..bab1c58 --- /dev/null +++ b/__build/Dockerfile @@ -0,0 +1,25 @@ +ARG RUBY_VERSION=3.3 +FROM ruby:$RUBY_VERSION + +RUN apt-get update \ + && apt-get install -y \ + git \ + locales \ + make \ + nodejs + +COPY Gemfile Gemfile +RUN bundle install + +RUN \ + echo "en_US UTF-8" > /etc/locale.gen && \ + locale-gen en-US.UTF-8 + +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US.UTF-8 +ENV LC_ALL en_US.UTF-8 + +WORKDIR /src/site + + +CMD ["jekyll", "serve", "-H", "0.0.0.0", "-P", "4000"] diff --git a/__build/Gemfile b/__build/Gemfile new file mode 100644 index 0000000..0c8671c --- /dev/null +++ b/__build/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "github-pages", group: :jekyll_plugins