command
module
Version:
v0.1.5
Opens a new window with list of versions in this module.
Published: Jan 25, 2025
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Deployer
Auto deploy with GitHub webhook
Possibility
- Run
make build from directory for configuration repository + branch
- Send build status to specific chat in telegram
Handlers
/ping - response with status OK
/hook/github - webhook for GitHub Webhooks
- response with status Accepted if deploy has been started
- response with status NonAcceptable if deploy impossible to start (invalid payload, not push event and another)
Important
- For deploy will be created only one job, other deploy jobs will be canceled
- If push event accepted but repository or branch not configured - job will be skipped
Requirements
Installation
- Clone this repository
git clone https://github.com/toppi-me/deployer.git
- Create .env file
cp .env.example .env
- Create config file
cp .config.json.example .config.json
- Setup
.env and config.json files with your data
- Run
go mod download and go build .
- Run
chmod +x deployer
Create systemd
nano or vim /etc/systemd/system/deployer.service
Example of deployer.service file
[Unit]
Description=Deployer
After=network.target
[Service]
User=root
Group=root
WorkingDirectory=/root/toppi-me/deployer
ExecStart=/root/toppi-me/deployer/deployer
Restart=always
[Install]
WantedBy=multi-user.target
- Need to change
User, Group and path to binary ExecStart
- Start service
sudo systemctl start deployer.service
Contributions:
Any contributions are welcome, also if there are problems in the process, then create an issue
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
|
|
|
|
|
|
|
|
|
internal
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.