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]
|
||||
|
||||
@@ -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
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",
|
||||
"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",
|
||||
|
||||
Reference in New Issue
Block a user