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]
|
||||
|
||||
on: push
|
||||
name: 🚀 Deploy website on push
|
||||
jobs:
|
||||
build:
|
||||
web-deploy:
|
||||
name: 🎉 Deploy
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
- name: 🚚 Get latest code
|
||||
uses: actions/checkout@v2.3.2
|
||||
|
||||
- name: Use Node.js 12
|
||||
uses: actions/setup-node@v2-beta
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm install
|
||||
- run: npm run build --if-present
|
||||
- name: FTP Deploy
|
||||
uses: SamKirkland/FTP-Deploy-Action@3.0.0
|
||||
node-version: '12'
|
||||
|
||||
- name: 🔨 Build Project
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
- name: 📂 Sync files
|
||||
uses: SamKirkland/FTP-Deploy-Action@4.0.0
|
||||
with:
|
||||
ftp-server: ${{ secrets.ftp_server }}
|
||||
ftp-username: ${{ secrets.ftp_user }}
|
||||
ftp-password: ${{ secrets.ftp_pwd }}
|
||||
local-dir: build/
|
||||
env:
|
||||
CI: true
|
||||
server: ${{ secrets.ftp_server }}
|
||||
username: ${{ secrets.ftp_user }}
|
||||
password: ${{ secrets.ftp_pwd }}
|
||||
local-dir: ./build/
|
||||
server-dir: code-docs/www/
|
||||
|
||||
Reference in New Issue
Block a user