All checks were successful
Build and Deploy Quartz / build-and-deploy (push) Has been skipped
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Build and Deploy Quartz
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, 'build')
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "24"
|
|
|
|
- name: Cache node_modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-modules-
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Build Quartz site
|
|
run: npx quartz build --bundleInfo
|
|
|
|
- name: Deploy to FTP
|
|
uses: SamKirkland/FTP-Deploy-Action@v4.3.0
|
|
with:
|
|
server: ${{ vars.FTP_SERVER }}
|
|
username: ${{ vars.FTP_USER }}
|
|
password: ${{ vars.FTP_PASSWORD }}
|
|
local-dir: public/
|
|
server-dir: /codenotes/
|