Welcome to CodeSyncer, the action that brings your server to life! 💥
CodeSyncer is a GitHub Action developed by ColdShard Hosting, the coolest hosting company in town! With CodeSyncer, you can effortlessly restart your server hosted on ColdShard's panel, ensuring your code is always up to date and in sync with your GitHub repository. 🌐
CodeSyncer is designed to simplify the process of syncing and updating your code on your ColdShard server. When triggered, CodeSyncer performs the following steps:
-
Makes a POST request to the ColdShard panel API, instructing it to restart your server. 🔄
-
Your server then pulls the latest code from your GitHub repository, ensuring it's always up to date. 🆙
-
Sit back, relax, and watch as your server syncs and updates your code automatically! 🍿
To get CodeSyncer up and running on your own repository, follow these simple steps:
-
Ensure you have a ColdShard server and an active GitHub repository, with the relevant config on your server. Follow this guide if you need help.
-
Generate an API key on the ColdShard panel. 🔑
-
In your GitHub repository, go to "Settings" ➡️ "Secrets" ➡️ "New repository secret".
-
Add a secret named
PTERODACTYL_API_KEY
and paste your ColdShard API key as the value. 🔒 -
Create a new workflow file (e.g.,
.github/workflows/restart-server.yml
) in your repository. -
Copy the following code into the workflow file:
name: Restart ColdShard Server
on:
push:
branches:
- main
jobs:
restart_server:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Restart Server
env:
API_KEY: ${{ secrets.PTERODACTYL_API_KEY }}
run: |
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"signal": "restart"
}' \
"https://panel.coldshard.com/api/client/servers/12334/power"
-
Customize the workflow as needed, replacing the server ID with your own.
-
Commit and push the workflow file to your repository.
-
Sit back, relax, and let CodeSyncer handle the rest! Your server will now automatically sync and update your code whenever you push changes to the
main
branch. 🎉
We welcome contributions from the community to make CodeSyncer even better! If you have any ideas, bug reports, or feature requests, please open an issue or submit a pull request. Let's collaborate and make code syncing a breeze! 🤝
CodeSyncer is released under the MIT License. Feel free to use, modify, and distribute this action as per the terms of the license.
We hope you find CodeSyncer useful for keeping your ColdShard server in sync with your GitHub repository. If you have any questions or need assistance, don't hesitate to reach out. Happy coding! 😄🚀