Skip to content

Fix:MODBUS接入文档更新 #661

Fix:MODBUS接入文档更新

Fix:MODBUS接入文档更新 #661

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- source
# 如果你想要进一步定义触发条件、路径等,可以查看文档
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
java: 11
cache: npm
- name: Install dependencies
run: npm ci
- name: create en
run: npm run write-translations -- --locale en
- name: crowdin
env:
CROWDIN_PERSONAL_TOKEN: ${{secrets.CROWDIN_PERSONAL_TOKEN}}
run: npm run crowdin:sync
- name: Build website
run: npm run build
- name: Compress build output
run: tar -czf build.tar.gz -C build .
# 部署到 GitHub Pages 的热门选择:
# 文档:https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# 要发布到 `gh-pages` 分支的构建输出:
publish_dir: ./build
# 下面两行会将此次部署 commit 的作者设置为官方的
# GH-Actions 机器人:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# 如果不设置这两个字段,GH actions 机器人会被默认使用。
# 你可以用自己的用户信息替换它们。
user_name: hezhuozhuo
user_email: 421045249@qq.com
- name: Deploy via SCP
uses: cross-the-world/ssh-scp-ssh-pipelines@latest
with:
host: ${{ secrets.DOCS_HOST }}
user: root
pass: ${{ secrets.DOCS_PASS }}
scp: './build.tar.gz => /srv/thingspanel.io'
last_ssh: |
echo "Starting deployment..."
cd /srv/thingspanel.io
rm -rf /srv/thingspanel.io/html/*
tar -xzf build.tar.gz -C /srv/thingspanel.io/html/
rm build.tar.gz
/usr/bin/podman restart thingspanel.io