27 lines
671 B
YAML
27 lines
671 B
YAML
name: build-and-deploy
|
||
|
||
on:
|
||
push:
|
||
branches: [main]
|
||
|
||
jobs:
|
||
build:
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
# raw checkout:绕开 actions/checkout(服务器拉 github action 不通)
|
||
# 仓库 public,job 容器经 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/
|