Обновить .gitea/workflows/test-runner.yml
This commit is contained in:
parent
02b60ca36e
commit
00b05f9312
|
@ -10,26 +10,21 @@ jobs:
|
||||||
runs-on:kyc_runner
|
runs-on:kyc_runner
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Set up workspace directory
|
|
||||||
run: mkdir -p /opt/myapp
|
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: /opt/myapp
|
path: myapp
|
||||||
|
|
||||||
- name: Verify Node.js installation
|
- name: Print working directory
|
||||||
|
run: pwd && ls -lah
|
||||||
|
|
||||||
|
- name: Move app to target directory
|
||||||
run: |
|
run: |
|
||||||
if ! command -v node &> /dev/null; then
|
sudo rm -rf /opt/myapp # Remove old deployment
|
||||||
echo "Node.js not found, installing..."
|
sudo mv ${{ github.workspace }}/myapp /opt/myapp
|
||||||
sudo apt update && sudo apt install -y nodejs
|
sudo chown -R $USER:$USER /opt/myapp
|
||||||
fi
|
|
||||||
echo "Using Node.js version: $(node -v)"
|
|
||||||
|
|
||||||
- name: List repository files
|
- name: Start application with Docker Compose
|
||||||
run: ls -lah /opt/myapp
|
|
||||||
|
|
||||||
- name: Start the application with Docker Compose
|
|
||||||
run: |
|
run: |
|
||||||
cd /opt/myapp
|
cd /opt/myapp
|
||||||
docker-compose up --build -d
|
docker-compose up --build -d
|
||||||
|
|
Loading…
Reference in New Issue
Block a user