This commit is contained in:
parent
ad3ba54726
commit
93c77ebd48
@ -23,6 +23,8 @@ The Act Runner reads the private key from a secret and uses it for SSH authentic
|
||||
|
||||
Zola is also installed by pulling a built release tar and extracting the binary. I have tried using the official Zola container, but it just would not work properly.
|
||||
|
||||
Here is an example from this very website [deployment action](https://git.0x45.cz/em/em.0x45.cz/src/branch/master/.gitea/workflows/deploy.yaml):
|
||||
|
||||
```yaml
|
||||
name: Build
|
||||
|
||||
@ -32,9 +34,9 @@ on:
|
||||
- master
|
||||
|
||||
env:
|
||||
ZOLA_VERSION: "0.18.0"
|
||||
HOST: ${{ secrets.SSH_HOSTNAME }}
|
||||
HOST_DIR: ${{ secrets.SSH_TARGET_DIR }}
|
||||
ZOLA_VERSION: ${{ vars.ZOLA_VERSION }}
|
||||
HOST: ${{ vars.HOST }}
|
||||
HOST_DIR: ${{ vars.HOST_DIR }}
|
||||
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
@ -64,6 +66,8 @@ jobs:
|
||||
rsync -r --delete-after public/* "${SSH_USERNAME}@${HOST}:${HOST_DIR}"
|
||||
```
|
||||
|
||||
The example cinfiguration uses both secrets and vars from within Gitea. These have to be set trough the web UI under *Settings > Actions*.
|
||||
|
||||
## Webserver configuration
|
||||
|
||||
The server needs a new user with write access to the website root directory. I still call it drone for the sake of not having to redo my server configuration.
|
||||
@ -88,7 +92,13 @@ Public key has to be added to `~/.ssh/authorized_keys` of the "drone" user.
|
||||
|
||||
| | |
|
||||
|-------------------|------------------------|
|
||||
| `SSH_HOSTNAME` | Server hostname |
|
||||
| `SSH_TARGET_DIR` | Website root directory |
|
||||
| `SSH_USERNAME` | In our case "drone" |
|
||||
| `SSH_PRIVATE_KEY` | Plaintext private key |
|
||||
|
||||
## Vars
|
||||
|
||||
| | |
|
||||
|-------------------|------------------------|
|
||||
| `ZOLA_VERSION` | Version of Zola |
|
||||
| `HOST` | Server hostname |
|
||||
| `TARGET_DIR` | Website root directory |
|
||||
|
Loading…
x
Reference in New Issue
Block a user