refactor(ci): to not to build in PR workflow, but only initialization

This commit is contained in:
Neko Ayaka
2025-11-27 14:17:26 +08:00
parent abf8179186
commit c3f7098511
5 changed files with 148 additions and 192 deletions
@@ -0,0 +1,47 @@
name: Cloudflare Workers (Preview) Prepare
on:
pull_request:
branches:
- main
jobs:
prepare:
name: Prepare preview sources
runs-on: ubuntu-latest
steps:
- name: Persist PR number
run: |
echo "${{ github.event.number }}" > pr_num
- name: Persist branch name
run: |
echo "${{ github.head_ref }}" > branch_name
- name: Upload PR artifact
uses: actions/upload-artifact@v5
with:
name: pr-num
path: ./pr_num
overwrite: true
- name: Upload branch artifact
uses: actions/upload-artifact@v5
with:
name: branch-name
path: ./branch_name
overwrite: true
- name: Checkout repository
uses: actions/checkout@v6
- name: Remove git metadata
run: rm -rf .git
- name: Upload source artifact
uses: actions/upload-artifact@v5
with:
name: preview-source
path: .
overwrite: true