PHengLEI-docs/.gitea/workflows/build.yml

37 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2024-08-02 09:29:51 +08:00
name: PHengLEI docs build
run-name: PHengLEI docs build
on: [push]
jobs:
PHengLEI-docs-build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: https://osredm.com/actions/checkout@v4
- name: setup node
uses: https://osredm.com/actions/setup-node@main
with:
node-version: 'v16.14.2'
2024-08-02 09:45:16 +08:00
- run: npm config set registry https://registry.npmmirror.com/
2024-08-02 09:29:51 +08:00
- run: npm install
- run: npm run build -- --locale zh-CN
- name: scp files to server
2024-08-02 11:05:37 +08:00
uses: https://osredm.com/actions/scp-action@v0.1.7
2024-08-02 09:29:51 +08:00
with:
host: 123.60.208.28
username: root
password: ${{ secrets.PASSWORD }}
port: 22
2024-08-02 13:59:01 +08:00
source: build/*
2024-08-02 11:50:25 +08:00
target: /root/test.build/phenglei/
#rm: true
2024-08-02 11:00:21 +08:00
- name: restart files server
2024-08-02 11:05:37 +08:00
uses: https://osredm.com/actions/ssh-action@v1.0.3
2024-08-02 11:00:21 +08:00
with:
host: 123.60.208.28
username: root
password: ${{ secrets.PASSWORD }}
port: 22
script: service nginx restart
2024-08-02 09:29:51 +08:00