██████╗ ██╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███╗ ██╗███╗ ██╗███████╗██████╗
██╔══██╗██║ ██╔═══██╗██╔════╝ ██╔══██╗██║ ██║████╗ ██║████╗ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║ ██║██║ ███╗ ██████╔╝██║ ██║██╔██╗ ██║██╔██╗ ██║█████╗ ██████╔╝
██╔══██╗██║ ██║ ██║██║ ██║ ██╔══██╗██║ ██║██║╚██╗██║██║╚██╗██║██╔══╝ ██╔══██╗
██████╔╝███████╗╚██████╔╝╚██████╔╝ ██║ ██║╚██████╔╝██║ ╚████║██║ ╚████║███████╗██║ ██║
╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝
This repo is to set up the runner for updating the blog at https://cslant.com/blog
We can use this runner to update the Blog automatically with CI/CD pipelines.
First, copy the .env.example file to .env and update the values.
envsubst < .env.example > .envIf you don't have envsubst command, you can use the following command:
cp .env.example .envIn the .env file, update the values to match your environment.
# .env
#SOURCE_DIR=~/source
SOURCE_DIR=/home/user/cslant.com/blog
[email protected]:cslant
# The name of the runner
WORKER_NAME="CSlant Blog"
# add the env to choose "npm" or "yarn" as the installer
INSTALLER=yarn
# App Config
# E.g: prod, dev
ENV=prod
NODE_VERSION=22
USE_SUBMODULES=falseImportant
- If the
SOURCE_DIRis wrong, the runner will not be able to find the source code. So, please make sure theSOURCE_DIRis correct.
Then, you can just run the following command to start the runner.
./runner.sh aThe runner has the following commands:
| Command | Description |
|---|---|
help, tips |
Shows the help message |
build, b |
Builds the Blog |
worker, w |
Create or restart the worker |
sync, blog_sync |
Sync the Blog with the remote repository |
all, a |
Runs all the commands |