Mirror the retry loop already used in desktop-build.yml for every remaining one-shot 'bun install --frozen-lockfile' step so transient registry or network failures (e.g. a failed mermaid tarball download) no longer fail the whole run. deploy-tools.yml gains shell: bash because its matrix includes windows-latest; sync-edgeever-upstream.yml uses break on success so the following verification commands still run.
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
name: Deploy EdgeEver Site
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "apps/site/**"
|
|
- "README.md"
|
|
- "docs/**"
|
|
- "package.json"
|
|
- "bun.lock"
|
|
- ".github/workflows/deploy-site.yml"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
deployments: write
|
|
|
|
concurrency:
|
|
group: edgeever-site-production
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
deploy:
|
|
# The official site is maintained by the upstream repository only. Product
|
|
# deployments and downstream self-hosted instances do not need Cloudflare Pages.
|
|
if: github.repository == 'tianma-if/edgeever'
|
|
name: Deploy Cloudflare Pages
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
for attempt in 1 2 3; do
|
|
if bun install --frozen-lockfile; then
|
|
exit 0
|
|
fi
|
|
if [[ "$attempt" = "3" ]]; then
|
|
exit 1
|
|
fi
|
|
sleep "$((15 * attempt))"
|
|
done
|
|
|
|
- name: Build site
|
|
run: bun run build:site
|
|
|
|
- name: Deploy site
|
|
uses: cloudflare/wrangler-action@v3
|
|
with:
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
command: pages deploy apps/site/dist --project-name=edgeever-official
|
|
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|