From b2c8c12b7cb06fafa0d01d06c2743e8af0c6079f Mon Sep 17 00:00:00 2001 From: choisungki Date: Wed, 15 Jan 2025 05:09:32 +0900 Subject: [PATCH] add deploy.yml --- .github/workflows/deploy.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..753d173 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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