mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-30 08:50:51 +01:00
Update deploy script
This commit is contained in:
parent
53d21582c4
commit
073ff1f24c
37
.github/workflows/deploy.yml
vendored
37
.github/workflows/deploy.yml
vendored
@ -19,21 +19,34 @@ jobs:
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install & Build
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: '~/.npm'
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- name: Reinstall @nitrots/nitro-renderer
|
||||
run: |
|
||||
npm run build:prod
|
||||
npm uninstall @nitrots/nitro-renderer
|
||||
npm install git+https://git@git.krews.org/nitro/nitro-renderer#dev
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm install
|
||||
- name: Build Nitro
|
||||
run: |
|
||||
npm run build
|
||||
- name: Archive Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
path: |
|
||||
build
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
port: ${{ secrets.PORT }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
key: ${{ secrets.SSHKEY }}
|
||||
path: |
|
||||
build
|
||||
target: "/var/www/nitrots.co/domains/prod.nitrots.co/html"
|
||||
- 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