This repository was archived by the owner on Sep 23, 2025. It is now read-only.
sandboxコマンドで取得したコードを正規表現に変換し、改行を含むコードの処理を改善 #114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update and Restart Service | |
on: | |
push: | |
branches: | |
- main # mainブランチが更新されたときに実行 | |
jobs: | |
update-and-restart: | |
runs-on: self-hosted | |
steps: | |
# リポジトリのディレクトリに移動して更新 | |
- name: Pull latest changes | |
run: | | |
cd /home/adminpi/Swiftly-bot | |
if [ -d ".git" ]; then | |
git reset --hard | |
git pull origin main | |
else | |
git clone https://github.com/techfish-11/Swiftly-bot.git /home/adminpi/Swiftly-bot | |
fi | |
# systemdサービスを再起動 | |
- name: Restart systemd service | |
run: | | |
sudo systemctl restart swiftly-bot.service |