Add .gitea/workflows/deploy-static.yml
Some checks failed
Deploy Static Website / build-and-deploy (push) Failing after 29s
Some checks failed
Deploy Static Website / build-and-deploy (push) Failing after 29s
This commit is contained in:
32
.gitea/workflows/deploy-static.yml
Normal file
32
.gitea/workflows/deploy-static.yml
Normal 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}/"
|
||||||
Reference in New Issue
Block a user