Files
official-site-base/.gitea/workflows/deploy.yml
T
lzy 71d0721290
build-and-deploy / build (push) Successful in 45s
ci: 去掉 ossutil version(v1.7 无此子命令)
2026-07-24 00:59:59 +08:00

40 lines
1.1 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
- 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