This commit is contained in:
Maximilian Keßler 2023-10-17 20:34:13 +02:00
parent 3e167269c6
commit 68962df5bf
Signed by: max
GPG Key ID: BCC5A619923C0BA5
1 changed files with 44 additions and 0 deletions

44 Normal file
View File

@ -0,0 +1,44 @@
# abstractnonsense/pages
These are scripts that we use on [][git]
to have deployment to a [GitLab pages](gl-pages)-like environment.
They are meant to be used in conjunction with [actions/pages][action-pages]
to deploy to [][pages],
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 `` to `/home/pages/` (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 ` <owner>/<repository>` to generate a ssh keypair and set up the `pages` user to accept this.
Here, `<owner>/<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 named `PAGES_SSH_KEY`.
Now you should be fine to use the action as described in [actions/pages][action-pages].