blog/.gitea/workflows/deploy.yml
Linloir 0bf45eed49
Some checks failed
Deploy Pages / Generate-Pages (push) Failing after 6m50s
Deploy Pages / Deploy-Pages (push) Failing after 13m11s
initial commit
2024-10-05 22:59:07 +08:00

43 lines
1.0 KiB
YAML

name: Deploy Pages
run-name: ${{ gitea.event.head_commit.message }}
on:
push:
branches:
- main
jobs:
Generate-Pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Generate pages
run: hexo generate
- name: Upload generated pages
uses: actions/upload-artifact@v4
with:
name: generated-pages-${{ github.run_id }}
path: public
if-no-files-found: error
overwrite: true
include-hidden-files: true
compression-level: 5
Deploy-Pages:
runs-on: nas-host
steps:
- name: Remove old pages
run: rm -rf ${{ env.PAGE_ROOT }}/*
- name: Download generated pages
uses: actions/download-artifact@v4
with:
name: generated-pages-${{ github.run_id }}
path: ${{ env.PAGE_ROOT }}