mirror of
https://github.com/ArthurDanjou/arthurdanjou.fr.git
synced 2026-01-14 12:14:34 +01:00
configure node.js.yml
This commit is contained in:
55
.github/workflows/node.js.yml
vendored
55
.github/workflows/node.js.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Node.js CI
|
name: Deploy, Install, Build & Run
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
@@ -6,19 +6,44 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [12.x, 14.x]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v1
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v1
|
- name: Deploy
|
||||||
with:
|
uses: appleboy/scp-action@master
|
||||||
node-version: ${{ matrix.node-version }}
|
env:
|
||||||
- run: npm install
|
HOST: ${{ secrets.SSH_HOST }}
|
||||||
- run: npm run build --if-present
|
USERNAME: ${{ secrets.SSH_USERNAME }}
|
||||||
- run: pm2 reload next-js
|
PORT: ${{ secrets.SSH_PORT }}
|
||||||
env:
|
KEY: ${{ secrets.SSH_KEY }}
|
||||||
CI: true
|
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
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
1
dist/app.scss.map
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -6,7 +6,8 @@
|
|||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"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": {
|
"dependencies": {
|
||||||
"@zeit/next-sass": "^1.0.1",
|
"@zeit/next-sass": "^1.0.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user