Skip to content

Update main.yml

Update main.yml #108

Workflow file for this run

name: CICD
on:
push:
branches:
- release
merge_group:
branches:
- release
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install dependencies with pnpm
run: pnpm install
- name: Run build task
env:
CI: false
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
GENERATE_SOURCEMAP: false
run: pnpm build
- name: Generating tarball
run: cd build && tar -czf ../artifact.tar.gz .
- name: Deploy to Server
uses: easingthemes/ssh-deploy@v5.0.0
with:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
SOURCE: artifact.tar.gz
TARGET: /www/temp
SCRIPT_AFTER: cd /www/temp && tar -xf artifact.tar.gz && ls -l