Merge branch 'main' of https://github.com/Chuyaoyuan/code-docs into main
This commit is contained in:
@@ -1,29 +1,28 @@
|
|||||||
name: Node.js CI
|
on: push
|
||||||
|
name: 🚀 Deploy website on push
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
web-deploy:
|
||||||
|
name: 🎉 Deploy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [12.x]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: 🚚 Get latest code
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
uses: actions/checkout@v2.3.2
|
||||||
uses: actions/setup-node@v1
|
|
||||||
|
- name: Use Node.js 12
|
||||||
|
uses: actions/setup-node@v2-beta
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: '12'
|
||||||
- run: npm install
|
|
||||||
- run: npm run build --if-present
|
- name: 🔨 Build Project
|
||||||
- name: FTP Deploy
|
run: |
|
||||||
uses: SamKirkland/FTP-Deploy-Action@3.0.0
|
npm install
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: 📂 Sync files
|
||||||
|
uses: SamKirkland/FTP-Deploy-Action@4.0.0
|
||||||
with:
|
with:
|
||||||
ftp-server: ${{ secrets.ftp_server }}
|
server: ${{ secrets.ftp_server }}
|
||||||
ftp-username: ${{ secrets.ftp_user }}
|
username: ${{ secrets.ftp_user }}
|
||||||
ftp-password: ${{ secrets.ftp_pwd }}
|
password: ${{ secrets.ftp_pwd }}
|
||||||
local-dir: build/
|
local-dir: ./build/
|
||||||
env:
|
server-dir: code-docs/www/
|
||||||
CI: true
|
|
||||||
|
|||||||
Reference in New Issue
Block a user