Initial commit: Docusaurus site with DGX Spark article

This commit is contained in:
2026-02-19 01:48:49 +00:00
commit 5247c6b553
23 changed files with 20134 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
name: Deploy Docusaurus Site
on:
push:
branches:
- main
jobs:
deploy:
runs-on: host
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
run: |
echo "Node version: $(node -v)"
echo "npm version: $(npm -v)"
- name: Install npm dependencies
run: npm ci
- name: Build static site
run: npm run build
- name: Deploy static files to nginx serving directory
run: |
# デプロイ先ディレクトリ(必要に応じて変更)
DEPLOY_DIR="/var/www/docusaurus/swallow-tech-notes"
# ディレクトリ作成(初回のみ)
sudo mkdir -p $DEPLOY_DIR
# 既存の静的ファイルを削除
sudo rm -rf $DEPLOY_DIR/*
# build フォルダ内の全ファイルを nginx のルートへコピー
sudo cp -R build/* $DEPLOY_DIR/
- name: Reload nginx service
run: sudo systemctl reload nginx
- name: Deployment complete
run: |
echo "✅ Deployment successful!"
echo "Site deployed to: $DEPLOY_DIR"