From d90d679292ca53d13d6acf9887ce1e9a5abdffd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Tue, 17 Oct 2023 19:01:27 +0200 Subject: [PATCH] add README / documentation --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..6876680 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# actions/pages + +GitHub/Gitea action to deploy a static webpage, similar to GitLab actions. + +Since Gitea (as of October 2023) does not have an integrated pages feature, +this assumes that you have access to +- a webserver that can serve your files via https +- the ability to add ssh-keys to that server used +- a suitable webroot on your server where that the ci deploys to +and prepared your server accordingly. + +See [abstractnonsense/pages](https://git.abstractnonsense.se/abstractnonsense) +for scripts and detailed explanations on how to set up the webserver part +that you need for this action to work. + +## Existing deploy +Here on `git.abstractnonsen.se`, we already have an instance deployed. +If you want to use it, contact [Max](https://git.abstractnonsen.se/max) or [Josia](https://git.abstractnonsen.se/josia) to set up ssh keys. + + +## Inputs + +Regarding access to the server (defaults in parantheses): +- `host-user` (`pages`): The Linux user of your webserver for which you have configured the ssh key. +- `host` (`abstractnonsen.se`): Hostname to access, typically your domain. +- `host-key` (`ssh-ed25519 AAA...`): Public ssh hostkey (the one that would usually be in `~/.ssh/known_hosts`, including the key type but not the hostname +- `ssh-key`: SSH private key for authentication (the one usually in `~/.ssh/id_rsa`. If not specified, the `PAGES_SSH_KEY` secret (from gitea) will be read, this is the preferred and secure way to use this. +- `directory` (`public`): Directory to deploy. All files *in* this directory will be deployed. +- `index` (`true`): If `true`, `tree` will be used to generate a list of files into `index.html`. +- `index-title` (name of repository): Header and title of the generated `index.html`. + + +## Example + +``` +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: prepare pages + run: | + mkdir public + mv some_file.txt public + mv some_other_file.html public + - uses: actions/pages@v1 + with: + index-title: "CI test" +```