Skip to content

upgrade

upgrade #117

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: build and deploy
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js '16.x'
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: build
run: pnpm run build
- name: ssh deploy
uses: easingthemes/[email protected]
with:
SSH_PRIVATE_KEY: ${{ secrets.DEPOLY_SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.DEPOLY_REMOTE_HOST }}
REMOTE_USER: ${{ secrets.DEPOLY_REMOTE_USER }}
REMOTE_PORT: ${{ secrets.DEPOLY_REMOTE_PORT }}
SOURCE: dist-app
TARGET: ${{ secrets.DEPOLY_REMOTE_TARGET }}