Go to file
rj 3e796b137c
Whoops
2023-01-17 19:15:00 -08:00
.env.example Initial commit 2023-01-17 19:11:41 -08:00
.gitignore Initial commit 2023-01-17 19:11:41 -08:00
LICENSE Initial commit 2023-01-17 19:11:41 -08:00
README.md Whoops 2023-01-17 19:15:00 -08:00
deploy.sh Initial commit 2023-01-17 19:11:41 -08:00
deployer.js Initial commit 2023-01-17 19:11:41 -08:00
example-workflow.yml Initial commit 2023-01-17 19:11:41 -08:00
index.js Initial commit 2023-01-17 19:11:41 -08:00
logger.js Initial commit 2023-01-17 19:11:41 -08:00
package-lock.json Initial commit 2023-01-17 19:11:41 -08:00
package.json Initial commit 2023-01-17 19:11:41 -08:00
ufw.js Initial commit 2023-01-17 19:11:41 -08:00
yeller.js Initial commit 2023-01-17 19:11:41 -08:00

README.md

ahoy

Deploys Tadah images

Configuration

Key Expected value
WEBHOOK_SECRET The secret specified in the webhook configured with the GitHub repository
WEBHOOK_NAME Webhook name (default: "Ahoy")
WEBHOOK_PAYLOAD Payload URL secret
TADAH_PATH Tadah source path, relative to the server file directory
NGINX_PATH NGINX snippets path, relative to the server file directory, ex: /etc/nginx
NGINX_HTML_PATH NGINX WWW path, ex: /var/www
AHOY_PORT What server port to run this on (default: 9000)
YELLER_TOKEN Yeller (Discord bot) bot application token
DEPLOY_LOG_CHANNEL_ID Ahoy deploy logd Discord channel ID
DEPLOY_ERROR_CHANNEL_ID Ahoy error log Discord channel ID
DEVELOPER_ROLE_ID Discord Developer role ID (or whoever important to ping)
DEVELOPERS Equal sign separated list of developers (i.e. github_email@mail.com=developer1))

Usage

  1. Configure and deploy on the server
  2. Add required secrets
  3. Add the sample workflow to repository
  4. Voila

Workflow

See example-workflow.yml as an example. You need to then add AHOY_HOSTNAME, AHOY_PAYLOAD, and AHOY_SECRET to the GitHub repository. Place the workflow in the branch, with the path .github/workflows/ahoy.yml.

Notes

  • Assumes NPM and Git are installed
  • a+rwx should be on source code folder
  • NPM should be installed already (for Laravel Mix)
  • Run with sudo pm2 start .. You need sudo
  • UFW should be denying all incoming traffic by default, and should only be allowing the IP ranges that GitHub Actions uses for AHOY_PORT. You may block ports via sudo ufw deny $port, or automatically import all UFW configuration by running sudo npm ufw. You should probably only run the UFW command upon initial setup (meaning, do it once.)
  • deploy.sh is an executable - run chmod +x deploy.sh

License

Copyright Tadah 2021. All rights reserved

Licensed under the GNU Affero General Public License v3.0. A copy of it has been included. This repository was archived in its original state on January 17th, 2023. The last modification to the original repository was on December 17th, 2021.