Skip to content

fix: fix deploy script #9

fix: fix deploy script

fix: fix deploy script #9

Workflow file for this run

name: Build & Deploy
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.*]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install app dependencies
run: yarn install
- name: Build app
run: yarn build
- name: Clean up
run: rm -rf ./node_modules && rm -rf ./dist && rm -rf ./.git;
- name: Deploying
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.APP_SSH_KEY }}
- name: Deliver
run: |
zip -r ovpnrental.zip ./;
scp -oStrictHostKeyChecking=no ovpnrental.zip deploy@${{ secrets.APP_SSH_HOST }}:ovpnrental.zip;
scp -oStrictHostKeyChecking=no install.sh deploy@${{ secrets.APP_SSH_HOST }}:install.sh;
ssh -oStrictHostKeyChecking=no deploy@${{ secrets.APP_SSH_HOST }} <<< $'chmod +x ./install.sh';
ssh -oStrictHostKeyChecking=no deploy@${{ secrets.APP_SSH_HOST }} <<< $'./install.sh';