nitro-react/.github/workflows/deploy.yml

50 lines
1.3 KiB
YAML
Raw Normal View History

2021-09-16 07:17:49 +02:00
name: Deploy Bundle@dev
on:
push:
branches: [ dev ]
jobs:
build:
2021-09-17 05:31:22 +02:00
runs-on: self-hosted
2021-09-17 00:56:18 +02:00
strategy:
matrix:
2021-09-17 05:30:30 +02:00
node-version: [14.x]
2021-09-16 07:17:49 +02:00
steps:
2021-09-16 07:42:56 +02:00
- name: Checkout Repository
uses: actions/checkout@v2
2021-09-17 00:56:18 +02:00
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
2021-09-17 06:49:15 +02:00
- name: Cache dependencies
uses: actions/cache@v2
with:
path: '~/.npm'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
2021-09-17 07:02:03 +02:00
- name: Install dependencies
2021-09-17 06:49:15 +02:00
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
2021-09-16 07:42:56 +02:00
- name: Archive Artifacts
uses: actions/upload-artifact@v2
with:
path: |
build
2021-09-17 06:49:15 +02:00
- 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 }}