minified markdown a bit
This commit is contained in:
parent
d53bae9537
commit
34df58168b
4 changed files with 16 additions and 7 deletions
src/data/blog
|
@ -60,7 +60,9 @@ deploy-site:
|
|||
```
|
||||
|
||||
First installing ssh and readying everything from the CI variables, this was a big change from the Pages configuration. But there was one thing that really bothered me: The ssh call. If you look at it, you can see that I left out the commands that are passed to `ssh`. There is a good reason: These are waaaay too long.
|
||||
If displayed as separated shell calls, they would look something like this:
|
||||
|
||||
<details>
|
||||
<summary>commands formatted as a shell script</summary>
|
||||
|
||||
```shell
|
||||
screen -X -S website-firq-npx kill;
|
||||
|
@ -78,6 +80,8 @@ cd ~;
|
|||
screen -S website-firq-npx -dm npx serve public/ -p 9000 -c serve.json"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
With the following directory structure on the remote host, this can easily be explained:
|
||||
|
||||
```plain
|
||||
|
@ -172,7 +176,8 @@ After completing, the new stage begins.
|
|||
Since the files are now built on the GitLab server and not in the Proxmox instance, the files need to be moved over during the pipeline. This can be achieved by a great utility known as `rsync`. It can be used for sending data via ssh to any client that supports it, which makes it the ideal tool for my use-case.
|
||||
I also recommend looking <a href="https://blog.mitsunee.com/post/copy-steam-games-rsync" target="_blank" rel="noopener noreferrer">at this blog post from Mitsunee</a> detailing how to use `ssh` and `rsync` to sync game libraries to the Steam Deck with ease.
|
||||
|
||||
In my case, the resulting `.gitlab-ci.yml` looked like this:
|
||||
<details>
|
||||
<summary>`.gitlab-ci.yml`</summary>
|
||||
|
||||
```yaml
|
||||
deploy-site:
|
||||
|
@ -201,6 +206,8 @@ deploy-site:
|
|||
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -dm npx serve public/ -p 9000 -c serve.json"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
First, you have the rsync and ssh setup, which now also creates a new ssh-config for this. This really reduces the amount of arguments that need to be passed to ssh and rsync, making the whole flow less error-prone. My main issue with setting this up was to find out how to structure this, as I needed to setup ssh from the pipeline
|
||||
without causing any weird issues. But by using a custom ssh-key and config, it became really easy to get this to run.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue