Skip to content

Commit

Permalink
comment deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Dnouv committed Mar 21, 2024
1 parent 2346fb0 commit 30e334a
Showing 1 changed file with 47 additions and 47 deletions.
94 changes: 47 additions & 47 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,50 +198,50 @@ jobs:
name: build
path: ${{ env.BUILD_PATH }}

deploy:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} # don't wanna run on prs
needs: [bat]

steps:
- name: Download build archive
uses: actions/download-artifact@v3
with:
name: build
path: /tmp/

# - name: Push archive
# uses: easingthemes/ssh-deploy@main
# env:
# SOURCE: ${{ env.BUILD_PATH }}
# TARGET: ${{ secrets.TARGET }}
# REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
# REMOTE_USER: ${{ secrets.REMOTE_USER }}
# REMOTE_PORT: ${{ secrets.REMOTE_PORT }}
# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
#
# - name: Start remote service
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.REMOTE_HOST }}
# port: ${{ secrets.REMOTE_PORT }}
# username: ${{ secrets.REMOTE_USER }}
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# script: |
# target=${{ secrets.TARGET }}
# build_path=${{ secrets.BUILD_PATH }}
# cd $target
# tar zxf $build_path
# rm -f $build_path
# npm install --production
# pm2 reload ecosystem.config.js

- name: Push archive and start service
uses: debdutdeb/rc4community.deploy.action@main
with:
remote_host: ${{ secrets.REMOTE_HOST }}
remote_port: ${{ secrets.REMOTE_PORT }}
remote_user: ${{ secrets.REMOTE_USER }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
source: ${{ env.BUILD_PATH }}
target: ${{ secrets.TARGET }}
# deploy:
# runs-on: ubuntu-latest
# if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} # don't wanna run on prs
# needs: [bat]

# steps:
# - name: Download build archive
# uses: actions/download-artifact@v3
# with:
# name: build
# path: /tmp/

# # - name: Push archive
# # uses: easingthemes/ssh-deploy@main
# # env:
# # SOURCE: ${{ env.BUILD_PATH }}
# # TARGET: ${{ secrets.TARGET }}
# # REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
# # REMOTE_USER: ${{ secrets.REMOTE_USER }}
# # REMOTE_PORT: ${{ secrets.REMOTE_PORT }}
# # SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
# #
# # - name: Start remote service
# # uses: appleboy/ssh-action@master
# # with:
# # host: ${{ secrets.REMOTE_HOST }}
# # port: ${{ secrets.REMOTE_PORT }}
# # username: ${{ secrets.REMOTE_USER }}
# # key: ${{ secrets.SSH_PRIVATE_KEY }}
# # script: |
# # target=${{ secrets.TARGET }}
# # build_path=${{ secrets.BUILD_PATH }}
# # cd $target
# # tar zxf $build_path
# # rm -f $build_path
# # npm install --production
# # pm2 reload ecosystem.config.js

# - name: Push archive and start service
# uses: debdutdeb/rc4community.deploy.action@main
# with:
# remote_host: ${{ secrets.REMOTE_HOST }}
# remote_port: ${{ secrets.REMOTE_PORT }}
# remote_user: ${{ secrets.REMOTE_USER }}
# ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
# source: ${{ env.BUILD_PATH }}
# target: ${{ secrets.TARGET }}

0 comments on commit 30e334a

Please sign in to comment.