Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat 自動化検証 #19

Merged
merged 2 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/deployRasPi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: うすゆきー自動デプロイ

on:
pull_request:
branches:
- main
types: [closed]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
port: ${{ secrets.SERVER_PORT }}
script: |
echo "START🚀"
echo ${{ secrets.SERVER_USER_PASSWORD }} | sudo systemctl stop misskey
sudo su ${{ secrets.SERVER_MISSKEY_EXECUTION_USER }}
cd ~/usuyukey
git fetch
git reset --hard origin/usuyukey-master@v13
git submodule update --init --recursive
hash=$(echo "${{ github.sha }}" | cut -b -7)
sed -i -e "s/\(\"version\": \".*\)\(\"\)/\\1-usuyukey-${{ secrets.USUYUKEY_VERSION }}\2/" package.json
pnpm install
pnpm clean
NODE_ENV=production pnpm build
pnpm migrate
exit
sudo systemctl restart misskey
echo "DONE🥳"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "13.7.5-usuyukey-1.0.0",
"version": "13.7.5",
"codename": "indigo",
"repository": {
"type": "git",
Expand Down