Add CI/CD workflow configuration
Some checks failed
CI/CD Pipeline / build-and-test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
2026-01-28 09:52:13 +00:00
parent ce8fe9220a
commit c0442af26f

43
.gitea/workflows/cicd.yml Normal file
View File

@@ -0,0 +1,43 @@
name: CI/CD Pipeline
on:
push:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: npm install -g http-server
- name: Run tests
run: |
# Add test commands here
echo "Running tests..."
ls -la
- name: Build
run: |
# Any build steps if needed
echo "Build completed"
deploy:
needs: build-and-test
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Deploy to server
run: |
# Copy files to web directory
sudo mkdir -p /var/www/html/tic-tac-toe
sudo cp -r ./index.html ./styles.css ./script.js ./PROJECT_PLAN.md ./README.md ./DEPLOYMENT.md ./DOCKER_DEPLOY.md /var/www/html/tic-tac-toe/
echo "Deployment completed"