From d79022dbd917f5c02974f87154510ae10c8ad248 Mon Sep 17 00:00:00 2001 From: jimin Date: Mon, 8 Apr 2024 15:02:32 +0800 Subject: [PATCH] optimize: optimize workflow (#219) Signed-off-by: slievrly --- .github/workflows/CI.yml | 4 ++-- .github/workflows/deploy-oss.yml | 19 +++++++++---------- .github/workflows/deploy.yml | 15 +++++++++------ 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 03f228470d..b0de3d1420 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -8,10 +8,10 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [ 18.19.x ] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: diff --git a/.github/workflows/deploy-oss.yml b/.github/workflows/deploy-oss.yml index 2934d39ca3..146dd6a1d1 100644 --- a/.github/workflows/deploy-oss.yml +++ b/.github/workflows/deploy-oss.yml @@ -9,20 +9,19 @@ on: - cron: '0 */12 * * *' jobs: Build-Deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [ 18.19.x ] steps: - - uses: actions/checkout@master - - name: Use Node.js 18.x - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 with: - node-version: 18.x + node-version: ${{ matrix.node-version }} - name: Build run: | - npm install && npm run build && mkdir deploy-dist && cp -R build/* deploy-dist/ && mv build .htaccess *.txt *.xml deploy-dist/ - - name: Use Node.js 18.x - uses: actions/setup-node@v2 - with: - node-version: 18.x + npm install && npm run build -dd && mkdir deploy-dist && cp -R build/* deploy-dist/ && mv build .htaccess *.txt *.xml deploy-dist/ - run: npm i @serverless-devs/s -g --registry=https://registry.npmmirror.com - run: s config add --AccountID ${{secrets.ACCOUNT_ID}} --AccessKeyID ${{secrets.ACCESS_KEYID}} --AccessKeySecret ${{secrets.ACCESS_KEYSECRET}} -a higress -f - name: Deploy diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 701f7c2e38..425a076278 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,17 +8,20 @@ on: jobs: Build-Deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [ 18.19.x ] steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - - name: Use Node.js 18.x - uses: actions/setup-node@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 with: - node-version: 18.x + node-version: ${{ matrix.node-version }} - name: Build run: | - npm install && npm run build && mkdir -p deploy-dist && cp -R build/* deploy-dist/ && mv build .htaccess deploy-dist/ + npm install && npm run build -dd && mkdir -p deploy-dist && cp -R build/* deploy-dist/ && mv build .htaccess deploy-dist/ - name: Deploy uses: peaceiris/actions-gh-pages@v2.8.0 env: