Add .gitea/workflows/deploy-static.yml
Some checks failed
Deploy Static Website / build-and-deploy (push) Failing after 29s

This commit is contained in:
2025-01-09 07:23:35 +00:00
parent 8714d887ef
commit 847e8ce46d

View File

@@ -0,0 +1,32 @@
name: Deploy Static Website
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: static-sites
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Build site
run: npm run build
- name: Deploy to static-websites
run: |
SITE_NAME=${GITHUB_REPOSITORY##*/}
DEPLOY_PATH="/static-websites/${SITE_NAME}"
# Ensure directory exists
mkdir -p "${DEPLOY_PATH}"
# Copy new files
cp -r dist/* "${DEPLOY_PATH}/"