Skip to content

更新

更新 #11

name: Grav automatic deployment
on:
push:
branches:
- main
jobs:
hexo_deploy:
name: Grav automatic deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v3
with:
node-version: 20.17.0
- name: LXD deployment environment initialization
run: |
sudo snap install lxd
sudo lxd init --auto
sudo lxc remote add deploy direct.qhjack.top --password ${{secrets.LXD_PASSWORD}} --accept-certificate
sudo lxc remote switch deploy
- name: clear LXD cache
run: |
sudo lxc exec qhjack /usr/bin/clean_qhjack_web.fish
- name: Upload files to LXD on direct.qhjack.top
run: |
mkdir -p ../public/qhjack
cp -r * ../public/qhjack
sudo lxc file push -p -r ../public/qhjack qhjack/var/www/
- name: Autorun SelfUpgrade
run: |
sudo lxc exec qhjack /var/www/qhjack/scripts/auto-upgrade.fish