Skip to content

Commit

Permalink
Merge pull request #2 from Onboardbase/Mahmoudgalalz-patch-1
Browse files Browse the repository at this point in the history
Create main.yml
  • Loading branch information
Mahmoudgalalz authored Oct 14, 2024
2 parents 32e7d93 + d9dd7df commit d7838e9
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on:
push:
branches:
- main
- dev
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Deploying to Dev
uses: appleboy/[email protected]
if: github.ref == 'refs/heads/dev'
with:
host: ${{ secrets.DEV_SERVER }}
username: ${{ secrets.DEV_USER }}
key: ${{ secrets.DEV_SSH_KEY }}
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
cd /root/apps/securelog-rsc-example
git pull origin dev
yarn install
onboardbase run -c 'yarn build'
cp -r dist/* /var/www/secure-example
systemctl reload nginx
- name: Deploying to prod
uses: appleboy/[email protected]
if: github.ref == 'refs/heads/main'
with:
host: ${{ secrets.PROD_SERVER }}
username: ${{ secrets.PROD_USER }}
key: ${{ secrets.PROD_SSH_KEY }}
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
cd /root/apps/securelog-rsc-example
git pull origin main
yarn install
onboardbase run -c 'yarn build'
cp -r dist/* /var/www/secure-example
systemctl reload nginx

0 comments on commit d7838e9

Please sign in to comment.