mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-30 00:50:50 +01:00
Update build
This commit is contained in:
parent
e3ab2d9b48
commit
3049f83ba2
34
.github/workflows/build.yml
vendored
Normal file
34
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [dev]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: dedicated-server
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: "yarn"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
yarn remove @nitrots/nitro-renderer
|
||||
yarn add git+https://git@git.krews.org/nitro/nitro-renderer#dev
|
||||
yarn install
|
||||
- name: Build Nitro
|
||||
run: |
|
||||
yarn build
|
||||
- name: Archive Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
path: |
|
||||
build
|
49
.github/workflows/deploy.yml
vendored
49
.github/workflows/deploy.yml
vendored
@ -1,49 +0,0 @@
|
||||
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 }}
|
Loading…
Reference in New Issue
Block a user