ci: raw workflow + 配置适配华为云部署
build-and-deploy / build (push) Successful in 38s

This commit is contained in:
lzy
2026-07-24 00:54:01 +08:00
parent 60e18ded88
commit 57cdbe1b5b
3 changed files with 14 additions and 25 deletions
+10 -21
View File
@@ -8,30 +8,19 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
# raw checkout:绕开 actions/checkout(服务器拉 github action 不通)
# 仓库 publicjob 容器经 official-site_default 网络访问 gitea:3000
- name: Checkout
run: |
git config --global --add safe.directory '*'
git clone "http://gitea:3000/${GITHUB_REPOSITORY}.git" .
git checkout "${GITHUB_SHA}"
- name: Install deps
run: npm ci
run: npm ci --registry=https://registry.npmmirror.com
- name: Build
run: npm run build
- name: Upload dist artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
- name: Sync to OSS
env:
OSS_ACCESS_KEY_ID: ${{ secrets.OSS_ACCESS_KEY_ID }}
OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
OSS_ENDPOINT: ${{ secrets.OSS_ENDPOINT }}
OSS_BUCKET: ${{ secrets.OSS_BUCKET }}
CDN_DOMAIN: ${{ secrets.CDN_DOMAIN }}
run: bash scripts/deploy-oss.sh
- name: Verify dist
run: ls -la dist/