Skip to content
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
17 changes: 3 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
FROM jekyll/jekyll:3.8
## Currently jekyll/jekyll:4 fails with the error below so tag 3.8 is used instead.
# Dockerfile:10
# --------------------
# 8 | ## Install required gems
# 9 | COPY ./Gemfile ./Gemfile
# 10 | >>> RUN bundle install
# 11 |
# 12 | ## Copy source files
# --------------------
# ERROR: failed to solve: process "/bin/sh -c bundle install"
# did not complete successfully: exit code: 5
FROM jekyll/jekyll:stable

ENV JEKYLL_UID=1000
ENV JEKYLL_GID=1000

USER ${JEKYLL_UID}

## Install required gems
COPY ./Gemfile ./Gemfile
RUN bundle install

USER ${JEKYLL_UID}

## Copy source files
COPY --chown=${JEKYLL_UID}:${JEKYLL_GID} ./ ./

Expand Down
24 changes: 19 additions & 5 deletions docs/local_previews.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Working with the repo locally

Content-only changes can often be done directly on the GitHub website. Changes affecting the function or structure of the site should be previewed fully locally before being submitted via PR.
Content-only changes can often be done directly on the GitHub website. Changes affecting the function or structure of the site should be previewed fully locally before being submitted via PR.

## Jekyll

To preview the site locally, clone it.
To preview the site locally, clone it.

Then you'll need to [install jekyll](https://jekyllrb.com/docs/installation/).

Expand All @@ -14,9 +14,9 @@ Then go to the root of the site and issue (just once):
$ bundle install
```

which will install the necessary Ruby gems (the info for this is included in the repo files).
which will install the necessary Ruby gems (the info for this is included in the repo files).

And then (also in the top level directory of your forked repository) to be able to see the rendered website, run
And then (also in the top level directory of your forked repository) to be able to see the rendered website, run

```bash
$ jekyll serve
Expand All @@ -32,6 +32,8 @@ If you are having trouble try `rm -rf _site`, followed by `bundle update`, then

You can build and run a Docker container to preview the site locally and support a local development workflow. If you do not already have Docker installed, please visit https://docs.docker.com/get-docker/ and follow the links to get started with Docker on your operating system.

These instructions also work with the [Podman](https://podman.io/) container management tool simply by substituting `podman` for `docker` in the commands below. This can either be done manually, by creating a shell alias (e.g., `alias podman=docker`), or by installing a package such as `podman-docker` to automatically handle this translation.

Build the container image:

```bash
Expand Down Expand Up @@ -59,9 +61,21 @@ To develop the website, launch the container using the following command, where

```bash
docker run --rm -it -p 4000:4000 \
-v $(pwd):/srv/jekyll \
-u $(id -u):$(id -g) \
-v $(pwd):/srv/jekyll:Z \
us-rse-website:latest
```

or, if using Podman in a rootless environment:

```bash
podman run --rm -it -p 4000:4000 \
--userns=keep-id \
-v $(pwd):/srv/jekyll:Z \
us-rse-website:latest
```

If these commands fail, you may need to address any discrepancies between the user/group mapping in your container runtime and the permissions on the directory where the volume mount resides.

Edit a source file and save the changes. You will see Jekyll automatically regenerate the site, after which you can reload the page in your browser to see the rendered changes.

4 changes: 0 additions & 4 deletions docs/tests_ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,6 @@ Importantly, once you create the bot you'll need to add the following secrets to

Yes, this means that the tokens are specific to this account.

#### Post New Jobs to Mastadon

TBD: we welcome contributions to make this happen

#### Greetings

This simple greetings action greets first-time users (for issues).
Expand Down