diff --git a/.github/workflows/deploy-development.yml b/.github/workflows/deploy-development.yml index 1bbca72e..8dbe4f8d 100644 --- a/.github/workflows/deploy-development.yml +++ b/.github/workflows/deploy-development.yml @@ -17,19 +17,20 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ defaults: run: - working-directory: ${{ env.NODE_ENV }} + working-directory: ${{ env.SERVER_PROFILE }} steps: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 with: - path: ${{ env.NODE_ENV }} + path: ${{ env.SERVER_PROFILE }} - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 #v.3.5.1 with: node-version: ${{ matrix.node-version }} - - run: cp ~/config-injection/ecosystem-${{ env.NODE_ENV }}.json ${{ env.PROJECT_PATH }}/ecosystem.json - - run: cp ~/config-injection/.env ${{ env.PROJECT_PATH }}/.env + - run: cp ~/config-injection/ecosystem-${{ env.SERVER_PROFILE }}.json ${{ env.PROJECT_PATH }}/ecosystem.json + - run: cp ~/config-injection/envs/.env.${{ env.NODE_ENV }} ${{ env.PROJECT_PATH }}/.env - run: sh ${{ env.PROJECT_PATH }}/script/prebuild.sh - run: sh ${{ env.PROJECT_PATH }}/script/reload.sh env: NODE_ENV: development + SERVER_PROFILE: development PROJECT_PATH: ~/actions-runner/_work/A.fume.Server/A.fume.Server/development diff --git a/.github/workflows/deploy-production-1.yml b/.github/workflows/deploy-production-1.yml index 48801376..3f028a2d 100644 --- a/.github/workflows/deploy-production-1.yml +++ b/.github/workflows/deploy-production-1.yml @@ -13,23 +13,24 @@ jobs: runs-on: self-hosted strategy: matrix: - node-version: [12.x] + node-version: [16.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ defaults: run: - working-directory: ${{ env.NODE_ENV }} + working-directory: ${{ env.SERVER_PROFILE }} steps: - uses: actions/checkout@v2 with: - path: ${{ env.NODE_ENV }} + path: ${{ env.SERVER_PROFILE }} - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - run: cp ~/config-injection/ecosystem-${{ env.NODE_ENV }}.json ${{ env.PROJECT_PATH }}/ecosystem.json - - run: cp ~/config-injection/.env ${{ env.PROJECT_PATH }}/.env + - run: cp ~/config-injection/ecosystem-${{ env.SERVER_PROFILE }}.json ${{ env.PROJECT_PATH }}/ecosystem.json + - run: cp ~/config-injection/envs/.env.${{ env.NODE_ENV }} ${{ env.PROJECT_PATH }}/.env - run: sh ${{ env.PROJECT_PATH }}/script/prebuild.sh - run: sh ${{ env.PROJECT_PATH }}/script/reload.sh env: - NODE_ENV: production-1 + NODE_ENV: production + SERVER_PROFILE: production-1 PROJECT_PATH: ~/actions-runner/_work/A.fume.Server/A.fume.Server/production-1 diff --git a/.github/workflows/deploy-production-2.yml b/.github/workflows/deploy-production-2.yml index d4ae9977..2c56be63 100644 --- a/.github/workflows/deploy-production-2.yml +++ b/.github/workflows/deploy-production-2.yml @@ -13,23 +13,24 @@ jobs: runs-on: self-hosted strategy: matrix: - node-version: [12.x] + node-version: [16.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ defaults: run: - working-directory: ${{ env.NODE_ENV }} + working-directory: ${{ env.SERVER_PROFILE }} steps: - uses: actions/checkout@v2 with: - path: ${{ env.NODE_ENV }} + path: ${{ env.SERVER_PROFILE }} - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - run: cp ~/config-injection/ecosystem-${{ env.NODE_ENV }}.json ${{ env.PROJECT_PATH }}/ecosystem.json - - run: cp ~/config-injection/.env ${{ env.PROJECT_PATH }}/.env + - run: cp ~/config-injection/ecosystem-${{ env.SERVER_PROFILE }}.json ${{ env.PROJECT_PATH }}/ecosystem.json + - run: cp ~/config-injection/envs/.env.${{ env.NODE_ENV }} ${{ env.PROJECT_PATH }}/.env - run: sh ${{ env.PROJECT_PATH }}/script/prebuild.sh - run: sh ${{ env.PROJECT_PATH }}/script/reload.sh env: - NODE_ENV: production-2 + NODE_ENV: production + SERVER_PROFILE: production-2 PROJECT_PATH: ~/actions-runner/_work/A.fume.Server/A.fume.Server/production-2 diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index 8c56d155..734ac992 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -13,23 +13,24 @@ jobs: runs-on: self-hosted strategy: matrix: - node-version: [12.x] + node-version: [16.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ defaults: run: - working-directory: ${{ env.NODE_ENV }} + working-directory: ${{ env.SERVER_PROFILE }} steps: - uses: actions/checkout@v2 with: - path: ${{ env.NODE_ENV }} + path: ${{ env.SERVER_PROFILE }} - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - run: cp ~/config-injection/ecosystem-${{ env.NODE_ENV }}.json ${{ env.PROJECT_PATH }}/ecosystem.json - - run: cp ~/config-injection/.env ${{ env.PROJECT_PATH }}/.env + - run: cp ~/config-injection/ecosystem-${{ env.SERVER_PROFILE }}.json ${{ env.PROJECT_PATH }}/ecosystem.json + - run: cp ~/config-injection/envs/.env.${{ env.NODE_ENV }} ${{ env.PROJECT_PATH }}/.env - run: sh ${{ env.PROJECT_PATH }}/script/prebuild.sh - run: sh ${{ env.PROJECT_PATH }}/script/reload.sh env: NODE_ENV: production + SERVER_PROFILE: production PROJECT_PATH: ~/actions-runner/_work/A.fume.Server/A.fume.Server/production diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml index 809c9fb3..8ed99aaa 100644 --- a/.github/workflows/deploy-test.yml +++ b/.github/workflows/deploy-test.yml @@ -27,7 +27,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: cp ~/config-injection/ecosystem-${{ env.NODE_ENV }}.json ${{ env.PROJECT_PATH }}/ecosystem.json - - run: cp ~/config-injection/.env ${{ env.PROJECT_PATH }}/.env + - run: cp ~/config-injection/envs/.env.${{ env.NODE_ENV }} ${{ env.PROJECT_PATH }}/.env # - run: sudo ${{ env.PROJECT_PATH }}/script/prebuild.sh - run: ${{ env.PROJECT_PATH }}/script/reload.sh env: