Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cslant/blog-runner
This repo is to set up the runner for updating the blog at https://cslant.com/blog
https://github.com/cslant/blog-runner
blog cslant cslant-blog cslant-cicd cslant-github cslant-runner deploy runner
Last synced: 14 days ago
JSON representation
This repo is to set up the runner for updating the blog at https://cslant.com/blog
- Host: GitHub
- URL: https://github.com/cslant/blog-runner
- Owner: cslant
- License: mit
- Created: 2024-07-19T02:19:17.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-21T15:14:21.000Z (17 days ago)
- Last Synced: 2024-12-21T16:23:09.561Z (17 days ago)
- Topics: blog, cslant, cslant-blog, cslant-cicd, cslant-github, cslant-runner, deploy, runner
- Language: Shell
- Homepage: https://cslant.com/blog
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CSlant Blog Runner
```text
██████╗ ██╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███╗ ██╗███╗ ██╗███████╗██████╗
██╔══██╗██║ ██╔═══██╗██╔════╝ ██╔══██╗██║ ██║████╗ ██║████╗ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║ ██║██║ ███╗ ██████╔╝██║ ██║██╔██╗ ██║██╔██╗ ██║█████╗ ██████╔╝
██╔══██╗██║ ██║ ██║██║ ██║ ██╔══██╗██║ ██║██║╚██╗██║██║╚██╗██║██╔══╝ ██╔══██╗
██████╔╝███████╗╚██████╔╝╚██████╔╝ ██║ ██║╚██████╔╝██║ ╚████║██║ ╚████║███████╗██║ ██║
╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝
```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.
## Installation
First, copy the `.env.example` file to `.env` and update the values.
```bash
envsubst < .env.example > .env
```If you don't have `envsubst` command, you can use the following command:
```bash
cp .env.example .env
```In the `.env` file, update the values to match your environment.
```bash
# .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=prodNODE_VERSION=22
USE_SUBMODULES=false
```> [!IMPORTANT]
> ## Command can't be used if wrong values are set in the `.env` file.
> * If the `SOURCE_DIR` is wrong, the runner will not be able to find the source code. So, please make sure the `SOURCE_DIR` is correct.Then, you can just run the following command to start the runner.
```bash
./runner.sh a
```## Usage
The 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 |