configure node.js.yml

This commit is contained in:
2020-06-01 23:23:45 +02:00
parent 7c0dfa79f4
commit 277a5044f2
4 changed files with 1291 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
name: Node.js CI
name: Deploy, Install, Build & Run
on: [push]
@@ -6,19 +6,44 @@ jobs:
build:
runs-on: self-hosted
strategy:
matrix:
node-version: [12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build --if-present
- run: pm2 reload next-js
env:
CI: true
- uses: actions/checkout@v1
- name: Deploy
uses: appleboy/scp-action@master
env:
HOST: ${{ secrets.SSH_HOST }}
USERNAME: ${{ secrets.SSH_USERNAME }}
PORT: ${{ secrets.SSH_PORT }}
KEY: ${{ secrets.SSH_KEY }}
with:
source: "."
target: "/home/arthur/website"
- name: Install
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
USERNAME: ${{ secrets.SS_USERNAME }}
PORT: ${{ secrets.SSH_PORT }}
KEY: ${{ secrets.SSH_KEY }}
script: yarn install
- name: Build
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
USERNAME: ${{ secrets.SS_USERNAME }}
PORT: ${{ secrets.SSH_PORT }}
KEY: ${{ secrets.SSH_KEY }}
script: yarn build-all
- name: Run
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
USERNAME: ${{ secrets.SS_USERNAME }}
PORT: ${{ secrets.SSH_PORT }}
KEY: ${{ secrets.SSH_KEY }}
script: yarn start

1248
dist/app.scss vendored Normal file

File diff suppressed because it is too large Load Diff

1
dist/app.scss.map vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"sass": "sass ./public/style/style.scss:./dist/app.scss"
"sass": "sass ./public/style/style.scss:./dist/app.scss",
"build-all": "yarn build && yarn sass",
},
"dependencies": {
"@zeit/next-sass": "^1.0.1",