Step 0. If you have a private repository
First create a personal access token as instructed on https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token.
Skip step 1, go to 2, remove
#
from all the lines except first one and fill your details.
Step 1. Cloning your repository.
Set your startup command 1 to
git clone https://github.com/awesumperson/bot
(change the URL to the URL of your repo) in Daki panel settings, then run the bot. This should clone your repository into a folder inside your Daki container, which you should be then able to see inside Daki file manager. Make sure to remove thegit clone
from your startup command 1 once you have successfully cloned your repository into a folder on daki, one clone should suffice forever. To update your repository, read part 2.
Step 2. Updating your repository.
To update your repository, you need to fetch and pull inside it's folder. You can add to your startup script/create a startup script at
/home/container/startup.sh
, so that every time you start your bot it fetches and pulls. Inside/home/container/startup.sh
:#! /bin/bash #git config --global user.name "usename" #git config --global user.password "access token" #git clone https://github.com/awesumperson/bot cd bot git fetch git pull node run_bot.js Replace
bot
with whatever your bot repo folder is named (the one you got from git cloning) andnode run_bot.js
with whatever command you use to start your bot. If your script is namedstartup.sh
and it is in/home/container
, simply specifysh startup.sh
in startup command 1 to execute it when your bot is started. If you adjust this script according to your requirements while keeping the fetch and pull lines, your copy of the repo on daki will be updated every restart.