Files
official-site-base/.gitea/workflows/deploy.yml
T
lzy 88724d4692
build-and-deploy / build (push) Failing after 47s
ci: workflow 加 ossutil 安装与 OSS 同步步骤
2026-07-24 00:56:49 +08:00

41 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: build-and-deploy
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
# 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 --registry=https://registry.npmmirror.com
- name: Build
run: npm run build
- name: Verify dist
run: ls -la dist/
- name: Install ossutil
run: |
curl -fsSL -o /tmp/ossutilinstall.sh https://gosspublic.alicdn.com/ossutil/install.sh
bash /tmp/ossutilinstall.sh
ossutil version
- 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 }}
run: bash scripts/deploy-oss.sh