Skip to content

Change CI to create an artifact as well as uploading to the server. #235

Change CI to create an artifact as well as uploading to the server.

Change CI to create an artifact as well as uploading to the server. #235

Workflow file for this run

name: Node CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Uses PNPM
uses: pnpm/[email protected]
with:
version: 6.20.4
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: '16.x'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: dist
path: |
dist
- name: Deploy (Clean)
uses: garygrossgarten/github-action-ssh@release
with:
command: $HOME/clean-addons.sh
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USERNAME }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
privateKey: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy (Copy)
uses: garygrossgarten/github-action-scp@release
with:
local: dist
remote: addons
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USERNAME }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
privateKey: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy (Execute)
uses: garygrossgarten/github-action-ssh@release
with:
command: $HOME/update-addons.sh
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USERNAME }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
privateKey: ${{ secrets.SSH_PRIVATE_KEY }}