Compare commits

...

1 Commits

Author SHA1 Message Date
qxa 96666dd58d 修改发布脚本
部署生产环境 / 发布版本 (push) Successful in 16s Details
部署生产环境 / 编译发布 (push) Successful in 2m57s Details
部署开发环境 / 编译发布 (push) Successful in 2m27s Details
2024-06-14 11:00:40 +08:00
5 changed files with 23 additions and 29 deletions

View File

@ -6,8 +6,8 @@ on:
- develop - develop
env: env:
IMAGE_NAME: ${{ gitea.repository_owner }}/usercenter.web IMAGE_NAME: ${{ gitea.repository_owner }}/maketemplate.web
PUBLISH_PATH: usercenter.web PUBLISH_PATH: maketemplate.web
PUBLISH_HOST: 10.255.255.44 PUBLISH_HOST: 10.255.255.44
PUBLISH_PORT: 22 PUBLISH_PORT: 22
PUBLISH_REPLICAS: 1 #启动副本数量 PUBLISH_REPLICAS: 1 #启动副本数量
@ -16,21 +16,17 @@ jobs:
job1: job1:
name: 编译发布 name: 编译发布
runs-on: linux runs-on: linux
container:
image: node:16-bullseye
volumes:
#挂载缓存
- /opt/.runner/node_modules:/cache
steps: steps:
- name: 下载源码 - name: 下载源码
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: 使用缓存 - name: 使用缓存
uses: actions/cache@master uses: actions/cache@master
with: with:
mount: | mount: |
node_modules node_modules
hash_files: |
package.json
- name: 编译项目 - name: 编译项目
run: | run: |

View File

@ -6,8 +6,8 @@ on:
- master - master
env: env:
IMAGE_NAME: ${{ gitea.repository_owner }}/usercenter.web IMAGE_NAME: ${{ gitea.repository_owner }}/maketemplate.web
PUBLISH_PATH: usercenter.web PUBLISH_PATH: maketemplate.web
PUBLISH_HOST: 10.255.255.74 PUBLISH_HOST: 10.255.255.74
PUBLISH_PORT: 10022 PUBLISH_PORT: 10022
PUBLISH_REPLICAS: 1 #启动副本数量 PUBLISH_REPLICAS: 1 #启动副本数量
@ -21,7 +21,7 @@ jobs:
steps: steps:
- name: 下载源码 - name: 下载源码
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: 发布版本 - name: 发布版本
id: publish_version id: publish_version
@ -33,16 +33,15 @@ jobs:
needs: release needs: release
steps: steps:
- name: 下载源码 - name: 下载源码
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: 下载源码
uses: actions/checkout@v3
- name: 使用缓存 - name: 使用缓存
uses: actions/cache@master uses: actions/cache@master
with: with:
mount: | mount: |
node_modules node_modules
hash_files: |
package.json
- name: 编译项目 - name: 编译项目
shell: bash shell: bash

View File

@ -6,8 +6,8 @@ on:
- staging - staging
env: env:
IMAGE_NAME: ${{ gitea.repository_owner }}/usercenter.web IMAGE_NAME: ${{ gitea.repository_owner }}/maketemplate.web
PUBLISH_PATH: usercenter.web PUBLISH_PATH: maketemplate.web
PUBLISH_HOST: 10.255.255.3 PUBLISH_HOST: 10.255.255.3
PUBLISH_PORT: 22 PUBLISH_PORT: 22
PUBLISH_REPLICAS: 1 #启动副本数量 PUBLISH_REPLICAS: 1 #启动副本数量
@ -24,13 +24,15 @@ jobs:
steps: steps:
- name: 下载源码 - name: 下载源码
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: 使用缓存 - name: 使用缓存
uses: actions/cache@master uses: actions/cache@master
with: with:
mount: | mount: |
node_modules node_modules
hash_files: |
package.json
- name: 编译项目 - name: 编译项目
shell: bash shell: bash

View File

@ -6,8 +6,8 @@ on:
- published - published
env: env:
IMAGE_NAME: ${{ gitea.repository_owner }}/usercenter.web IMAGE_NAME: ${{ gitea.repository_owner }}/maketemplate.web
PUBLISH_PATH: usercenter.web PUBLISH_PATH: maketemplate.web
PUBLISH_HOST: 10.255.255.74 PUBLISH_HOST: 10.255.255.74
PUBLISH_PORT: 10022 PUBLISH_PORT: 10022
PUBLISH_REPLICAS: 1 #启动副本数量 PUBLISH_REPLICAS: 1 #启动副本数量
@ -16,21 +16,18 @@ jobs:
job1: job1:
name: 编译发布 name: 编译发布
runs-on: linux runs-on: linux
container:
image: node:16-bullseye
volumes:
#挂载缓存
- /opt/.runner/node_modules:/cache
steps: steps:
- name: 下载源码 - name: 下载源码
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: 使用缓存 - name: 使用缓存
uses: actions/cache@master uses: actions/cache@master
with: with:
mount: | mount: |
node_modules node_modules
hash_files: |
package.json
- name: 编译项目 - name: 编译项目
shell: bash shell: bash

View File

@ -2,12 +2,12 @@ version: "3"
services: services:
usercenter-web: usercenter-web:
image: ${REGISTRY:-harbor.w.23544.com:8843}/marking/usercenter.web:${TAG:-latest} image: ${REGISTRY:-harbor.w.23544.com:8843}/marking/maketemplate.web:${TAG:-latest}
hostname: marking hostname: marking
environment: environment:
TZ: Asia/Shanghai TZ: Asia/Shanghai
ports: ports:
- 4400:80 - 8898:80
deploy: deploy:
mode: replicated mode: replicated
replicas: ${REPLICAS:-1} replicas: ${REPLICAS:-1}