Skip to content

Commit

Permalink
uncomment deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Dnouv committed Mar 21, 2024
1 parent 0619793 commit 246792b
Showing 1 changed file with 48 additions and 48 deletions.
96 changes: 48 additions & 48 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Build, Test, Deploy"

on:
pull_request: #{ types: [ready_for_review] }
push: { branches: [main] }
push: { branches: [main, 23gsoc/demoday] }
# schedule:
# - cron: "36 */5 * * *"
#release: { types: [published] }
Expand Down 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 246792b

Please sign in to comment.