Skip to content

[main] test ci cd

[main] test ci cd #70

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "18.17.1"
architecture: "x64"
- name: Install npm
run: |
npm install -g npm@9.6.7
- name: Install dependencies
run: |
cd app
npm install
- name: Set CI to false
run: echo "CI=false" >> $GITHUB_ENV
- name: Build
run: |
cd app
echo "Current directory: $(pwd)"
ls -la
npm -v
node -v
npm run build --loglevel verbose
echo "Build complete"
- name: Deploying
uses: appleboy/ssh-action@master # An action made to control Linux servers
with: # We set all our secrets here for the action, these won't be shown in the action logs
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
#port: ${{ secrets.PORT }}
script: bash /home/binniev/Bigbee-front/.github/workflows/deploy.sh