-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
574f4af
commit ae79751
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Deploy Node.js app | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "packages/server/**/*.ts" | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to server | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Deploy server | ||
uses: appleboy/ssh-action@master # 使用第三方操作来执行 SSH 命令 | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
key: ${{ secrets.PASSWORD }} | ||
script_stop: true | ||
script: | # 执行部署相关的脚本 | ||
cd /root/15-music | ||
git pull | ||
sudo docker-compose build --build-arg version=$(git rev-parse --short HEAD) | ||
sudo docker-compose up -d server --no-deps |
ae79751
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
15s-music-web – ./
15s-music-web.vercel.app
15s-music-web-git-main-foundthewout.vercel.app
15s-music-web-foundthewout.vercel.app