Skip to content

Bump vite in the npm_and_yarn group across 1 directory (#33) #24

Bump vite in the npm_and_yarn group across 1 directory (#33)

Bump vite in the npm_and_yarn group across 1 directory (#33) #24

on:
release:
types: [ published ]
push: # additional check later to run only when message contains '[CI]'
branches: [ "main" ]
workflow_dispatch:
name: build and deploy
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && contains(github.event.head_commit.message, '[CI]'))
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: npm install
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: EsLint
run: npm run lint
- name: npm build
run: npm run build
env:
HASH: ${{ github.sha }}
- name: copy files via ssh
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SCP_HOST }}
username: ${{ secrets.SCP_USERNAME }}
key: ${{ secrets.SCP_KEY }}
port: 22
rm: true
source: "build/*"
target: ${{ secrets.SCP_TARGET }}
strip_components: 1