fix(ci): use repos list
This commit is contained in:
committed by
Tobias Fried
parent
a4421c82b2
commit
b6d47ab575
14
.github/sync-repos.txt
vendored
Normal file
14
.github/sync-repos.txt
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
phosphor-icons/core
|
||||
phosphor-icons/figma
|
||||
phosphor-icons/flutter
|
||||
phosphor-icons/penpot
|
||||
phosphor-icons/phosphor-elm
|
||||
phosphor-icons/play
|
||||
phosphor-icons/react
|
||||
phosphor-icons/sketch
|
||||
phosphor-icons/swift
|
||||
phosphor-icons/theme
|
||||
phosphor-icons/unplugin
|
||||
phosphor-icons/vue
|
||||
phosphor-icons/web
|
||||
phosphor-icons/webcomponents
|
||||
30
.github/workflows/sync-docs.yaml
vendored
30
.github/workflows/sync-docs.yaml
vendored
@@ -13,30 +13,14 @@ concurrency:
|
||||
group: 'docs'
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
# List of target repositories to sync to
|
||||
TARGET_REPOS: >-
|
||||
phosphor-icons/core
|
||||
phosphor-icons/figma
|
||||
phosphor-icons/flutter
|
||||
phosphor-icons/penpot
|
||||
phosphor-icons/phosphor-elm
|
||||
phosphor-icons/play
|
||||
phosphor-icons/react
|
||||
phosphor-icons/sketch
|
||||
phosphor-icons/swift
|
||||
phosphor-icons/theme
|
||||
phosphor-icons/unplugin
|
||||
phosphor-icons/vue
|
||||
phosphor-icons/web
|
||||
phosphor-icons/webcomponents
|
||||
|
||||
jobs:
|
||||
sync-docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: source-repo
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
@@ -49,12 +33,20 @@ jobs:
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: source-repo/pnpm-lock.json
|
||||
|
||||
- name: Read repository list
|
||||
id: repo-list
|
||||
run: |
|
||||
echo "repos<<EOF" >> $GITHUB_OUTPUT
|
||||
cat source-repo/.github/sync-repos.txt >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Sync to target repositories
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
echo "$TARGET_REPOS" | while read repo; do
|
||||
for repo in ${{ steps.repo-list.outputs.repos }}; do
|
||||
echo "Syncing to $repo"
|
||||
# Clone target repository
|
||||
gh repo clone $repo target-repo
|
||||
|
||||
Reference in New Issue
Block a user