Skip to content

Commit

Permalink
add deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
leafbird committed Jan 14, 2025
1 parent ee82a69 commit b2c8c12
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Hexo Deploy

on:
push:
branches:
- source

jobs:
deploy:
runs-on: ubuntu-latest

steps:
# 1. Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3

# 2. Setup Node.js
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18

# 3. Install Hexo and dependencies
- name: Install dependencies
run: |
npm install
# 4. Build the Hexo site
- name: Build Hexo site
run: |
npx hexo generate
# 5. Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public

0 comments on commit b2c8c12

Please sign in to comment.