Skip to content

Commit

Permalink
👷 Create build-and-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hellomrbigshot authored Apr 5, 2024
1 parent 6b37c0c commit b01ddc6
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Build and Deploy

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Node Version Change ➕
uses: actions/setup-node@v3
with:
node-version: 16

- name: Use Pnpm ➕
uses: pnpm/action-setup@v2
with:
version: 6
run_install: false

- name: Install and Build 🔧
run: |
pnpm i
pnpm build
# Deploy
- name: Deploy
uses: easingthemes/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.ACCESS_TOKEN }}
ARGS: "-avz --delete"
SOURCE: "build/"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.TARGET }}

0 comments on commit b01ddc6

Please sign in to comment.