plugin 配置 #121
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: v2 | |
jobs: | |
build: | |
runs-on: ubuntu-latest # 运行环境 | |
steps: | |
- name: checkout | |
uses: actions/checkout@master | |
- name: nodejs installation | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: npm install | |
run: npm add -D vitepress | |
working-directory: './' # working-directory 指定 shell 命令运行目录 | |
- name: npm run build | |
run: npm run docs:build | |
working-directory: './' | |
- name: scp | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.HOST_NEKO }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORDNEKO }} | |
source: '.vitepress/dist/*' | |
target: '/tmp/' | |
- name: script | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST_NEKO }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORDNEKO }} | |
script: | | |
rm -rf /root/docker_data/caddy/caddy_data/static_site/abv2/* | |
mv /tmp/.vitepress/dist/* /root/docker_data/caddy/caddy_data/static_site/abv2/ | |
rm -rf /tmp/.vitepress/ |