From 1a5e285f09cfc0506012da586f4a713dc276edd0 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 1 Dec 2025 10:15:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20.gitea/workflows/prod=5Fbu?= =?UTF-8?q?ild=5Fschedule.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/prod_build_schedule.yaml | 56 ----------------------- 1 file changed, 56 deletions(-) delete mode 100644 .gitea/workflows/prod_build_schedule.yaml diff --git a/.gitea/workflows/prod_build_schedule.yaml b/.gitea/workflows/prod_build_schedule.yaml deleted file mode 100644 index 0e712c5e..00000000 --- a/.gitea/workflows/prod_build_schedule.yaml +++ /dev/null @@ -1,56 +0,0 @@ -name: AiDA WEB-Node.js StableVersion 分支构建部署 -on: - schedule: - # cron为UTC时区,构建时间=部署时间-8小时 {*分 (-8)时 *日 *月 *周} --- - # 示例: 1月1日22点22分触发构建 cron写作 - '22 14 1 1 *' - - cron: '22 14 1 1 *' - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [ 18.18.0 ] - - steps: - - name: 1.检出代码 - uses: actions/checkout@v4 - with: - ref: StableVersion - - - name: 2.打印当前分支信息 - run: | - echo "Current branch being deployed is: $(git rev-parse --abbrev-ref HEAD)" - echo "The code is from the 'main' branch, as specified in 'actions/checkout'." - - - name: 3.设置 Node.js 环境 ${{ matrix.node-version }} - uses: actions/setup-node@v6 - with: - node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm run build - - run: ls -l - - - name: 3.5. 手动安装 AWS CLI v2 # 新增步骤:确保 aws 命令可用 - run: | - echo "安装 AWS CLI V2..." - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" - unzip awscliv2.zip - sudo ./aws/install --update - aws --version - echo "AWS CLI V2 安装完成。" - - - name: 4.配置 AWS 凭证 - uses: aws-actions/configure-aws-credentials@main - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: 'ap-east-1' - - - name: 5.同步 dist 目录到 S3 - run: | - aws s3 sync dist/* s3://${{ secrets.S3_BUCKET_NAME }}/ --acl public-read - - - name: 6.部署完成 - run: echo "构建和部署到 S3 任务完成。" \ No newline at end of file