Go to file
Josia Pietsch e9f147331d
updated readme
2024-02-22 16:27:34 +01:00
LICENSE add LICENSE 2023-10-17 20:34:18 +02:00
README.md updated readme 2024-02-22 16:27:34 +01:00
deploy.sh use 2 arguments for owner and repository path 2023-10-17 23:35:57 +02:00
setup-key.sh additional prints 2023-10-19 14:00:54 +02:00

README.md

abstractnonsense/pages

These are scripts that we use on git.abstractnonsense.se to have deployment to a GitLab pages-like environment.

They are meant to be used in conjunction with actions/pages to deploy to pages.abstractnonsen.se, but could be set up for any other domain.

Requirements

You need

  • a webserver with webroot
  • write-access to the webroot by some user
  • the ability to add ssh-keys to that user

Setup

initial setup

We recommend a system-user that is solely used for the pages deployment. We will call it pages for the rest of this file. Create it with

sudo adduser --system --shell /bin/bash --gecos 'Pages deployment' --group --disabled-password --no-create-home pages

Copy deploy.sh to /home/pages/deploy.sh (or some other place where you want to store it). Edit the configuration variables in the file to your liking. Here, you have to ensure that the pages user has write access to WEB_ROOT and STORAGE_ROOT. Also make sure that STORAGE_ROOT has permissions so that other users cannot read it with sudo chmod 600 <STORAGE_ROOT>.

Settting up a new repository

For each new repository, you want to do the following: Run setup-key.sh <owner> <repository> to generate a ssh keypair and set up the pages user to accept this. Here, <owner> and <repository> can be anything, it will be the path relative to the webroot where this ssh key will be able to deploy to, but this would be the recommended pattern for git instances.

In your repository, add the displayed ssh key as a secret (Settings -> Actions -> Secrets, note that Actions need to be enabled, see Settings -> Repository -> Advanced Settings) named PAGES_SSH_KEY. Now you should be fine to use the action as described in actions/pages.