Files
scheduler-back/.gitea/workflows/gitea-ci.yml
geonhee-min 810b4c1fb0
All checks were successful
Test CI / build (push) Successful in 1m29s
issue # server pc change
2025-11-28 13:10:59 +09:00

64 lines
1.4 KiB
YAML

name: Test CI
on:
push:
branches: [main]
jobs:
build:
runs-on: rpi5
env:
DOCKER_VOLUME: ${{ vars.DOCKER_VOLUME }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check PWD
run: |
echo "Docker volume: $DOCKER_VOLUME"
echo "PWD: $PWD"
ls -lRa ./.yarn
- name: Validate Node and Yarn Environment
run: |
if ! command -v node &> /dev/null
then
echo "Error: Node.js not found"
exit 1
fi
echo "Node.js version: $(node -v)"
if ! command -v yarn &> /dev/null
then
echo "Error: Yarn.js not found"
exit 1
fi
- name: Restore node_modules
id: cache-node
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v1-
- name: Install Dependencies with yarn
if: steps.cache-node.outputs.cache-hit != 'true'
run: |
yarn install --immutable
ls .
- name: Build Nestjs project
run: |
yarn build
ls .
- name: Deploy dist
run: |
cp -r dist $DOCKER_VOLUME/scheduler/back/
cp -r node_modules $DOCKER_VOLUME/scheduler/back/
ls $DOCKER_VOLUME/scheduler/back
docker exec -it scheduler_back pm2 reload scheduler-back