um-react/.gitea/workflows/build.yaml
鲁树人 3d45480fa0
Some checks failed
Build and Deploy / build (push) Failing after 1m15s
ci: use gitea actions for build and deployments
2024-12-15 21:21:54 +09:00

36 lines
1015 B
YAML

name: Build and Deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
npm_config_registry: https://registry.npmmirror.com
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4.0.0
with:
standalone: true
run_install: |
- args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Build
run: pnpm build
- name: Prepare for deployment
run: |
python3 -m zipfile -c um-react.zip dist/.
cp um-react.zip dist/"release-${GITHUB_SHA}.zip"
python3 -m zipfile -c um-react-site.zip dist/.
- name: Publish Artifact
uses: actions/upload-artifact@v4
with:
name: site
path: dist/
- name: Deploy
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_API_KEY: ${{ secrets.NETLIFY_API_KEY }}
run: |
./scripts/deploy.sh