mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-27 08:00:51 +01:00
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: Deploy Bundle@dev
|
|
|
|
on:
|
|
push:
|
|
branches: [ dev ]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: self-hosted
|
|
strategy:
|
|
matrix:
|
|
node-version: [14.x]
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v2
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: '~/.npm'
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
- name: Install dependencies
|
|
run: |
|
|
npm uninstall @nitrots/nitro-renderer
|
|
npm install git+https://git@git.krews.org/nitro/nitro-renderer#dev
|
|
- name: Build Nitro
|
|
run: |
|
|
npm run build
|
|
- name: Archive Artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
path: |
|
|
build
|
|
- name: Deploy Artifacts
|
|
uses: easingthemes/ssh-deploy@main
|
|
env:
|
|
REMOTE_HOST: ${{ secrets.HOST }}
|
|
REMOTE_PORT: ${{ secrets.PORT }}
|
|
REMOTE_USER: ${{ secrets.USERNAME }}
|
|
SSH_PRIVATE_KEY: ${{ secrets.SSHKEY }}
|
|
SOURCE: "build/"
|
|
TARGET: ${{ secrets.TARGET }}
|