File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and deploy
2+ on :
3+ workflow_dispatch :
4+ jobs :
5+ compile-and-deploy :
6+ runs-on : ubuntu-latest
7+ steps :
8+ - name : Check
9+ uses : actions/checkout@v4
10+ - name : Build
11+ run : |
12+ sudo apt-get update
13+ sudo apt-get install -y --no-install-recommends zip
14+ docker run --rm -v ${PWD}:/docs registry.fit2cloud.com/public/mkdocs-material:latest build
15+ zip -r -q -9 site.zip site
16+ ls -la site.zip
17+ - name : Upload
18+ 19+ with :
20+ host : ${{ secrets.PANEL_CN_HOST }}
21+ username : ${{ secrets.PANEL_CN_HOST_USERNAME }}
22+ port : 22
23+ key : ${{ secrets.PANEL_CN_HOST_KEY }}
24+ source : " site.zip"
25+ target : /tmp
26+ - name : Deploy
27+ 28+ with :
29+ host : ${{ secrets.PANEL_CN_HOST }}
30+ username : ${{ secrets.PANEL_CN_HOST_USERNAME }}
31+ key : ${{ secrets.PANEL_CN_HOST_KEY }}
32+ port : 22
33+ script : |
34+ cd /tmp
35+ rm -rf site
36+ unzip site.zip
37+ rm -rf /opt/1panel/docs/*
38+ mv /tmp/site/* /opt/1panel/docs
39+ /opt/nginx/bin/reload-nginx.sh
40+ rm -rf /tmp/site*
You can’t perform that action at this time.
0 commit comments