Skip to content

Commit

Permalink
upgrade github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Ouyang Chunhui <[email protected]>
  • Loading branch information
jack9603301 committed Dec 22, 2024
1 parent deac1c6 commit e079cc0
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/grav_auto_deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Hexo 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: |
cp -r * ../qhjack
sudo lxc file push -p -r ../qhjack qhjack/var/www/

0 comments on commit e079cc0

Please sign in to comment.