mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-10 20:03:18 +03:30
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2351994f63 | ||
|
|
8f661386b5 | ||
|
|
362eeaecb1 | ||
|
|
a048dea2a8 | ||
|
|
494ef34940 | ||
|
|
1ffe7b48d2 | ||
|
|
ed438ecf73 | ||
|
|
bcd2778538 | ||
|
|
6d786879c7 | ||
|
|
f3b54faac7 |
@@ -44,6 +44,40 @@ jobs:
|
|||||||
secrets: |
|
secrets: |
|
||||||
gitea_token=${{ secrets.TOKEN }}
|
gitea_token=${{ secrets.TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
name: Deploy Job
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build # Recommended: ensures deploy only runs if build succeeds
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
actions: read
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Deploy to server via native SSH
|
||||||
|
run: |
|
||||||
|
# 1. Setup SSH directory
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
chmod 700 ~/.ssh
|
||||||
|
|
||||||
|
# 2. Add host to known_hosts to bypass prompt
|
||||||
|
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
# 3. Setup the private key
|
||||||
|
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
# 4. Connect and execute commands
|
||||||
|
ssh -i ~/.ssh/id_rsa ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF'
|
||||||
|
cd /apps/admin-front
|
||||||
|
docker pull git.meshkee.com/${{ gitea.repository }}:${{ gitea.ref_name }}
|
||||||
|
IMAGE=git.meshkee.com/${{ gitea.repository }}:${{ gitea.ref_name }} docker compose up -d
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
# deploy:
|
# deploy:
|
||||||
# name: Deploy Job
|
# name: Deploy Job
|
||||||
# runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
|
|||||||
+6
-5
@@ -1,6 +1,7 @@
|
|||||||
# Build Stage
|
# Build Stage
|
||||||
#FROM docker.meshkee.com/repository/docker-hosted/node:22-alpine as build-stage
|
#FROM docker.meshkee.com/repository/docker-hosted/node:22-alpine as build-stage
|
||||||
FROM --platform=linux/amd64 git.meshkee.com/cssd/cssd-front:1.0.2 AS build-stage
|
#FROM --platform=linux/amd64 git.meshkee.com/cssd/cssd-front:1.0.2 AS build-stage
|
||||||
|
FROM git.meshkee.com/packages/node:14 AS build-stage
|
||||||
|
|
||||||
ARG REGISTRY_TOKEN
|
ARG REGISTRY_TOKEN
|
||||||
|
|
||||||
@@ -10,13 +11,13 @@ WORKDIR /app
|
|||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
#RUN npm config set registry=https://npm.parmincloud.ir
|
RUN npm config set registry=https://npm.parmincloud.ir
|
||||||
#
|
#
|
||||||
# RUN npm config set //repo.meshkee.com/repository/:_auth=$REGISTRY_TOKEN
|
# RUN npm config set //repo.meshkee.com/repository/:_auth=$REGISTRY_TOKEN
|
||||||
#
|
|
||||||
# RUN npm config set strict-ssl=false
|
|
||||||
|
|
||||||
#RUN npm install
|
RUN npm config set strict-ssl=false
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
COPY ./ .
|
COPY ./ .
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user