{"id":7199,"date":"2026-09-30T15:58:28","date_gmt":"2026-09-30T20:58:28","guid":{"rendered":"https:\/\/ykim.synology.me\/wordpress\/auto-sync-files-from-a-private-repo-to-a-public-repo-with-github-actions-7199\/"},"modified":"2026-09-30T15:58:38","modified_gmt":"2026-09-30T20:58:38","slug":"auto-sync-files-from-a-private-repo-to-a-public-repo-with-github-actions","status":"publish","type":"post","link":"https:\/\/ykim.synology.me\/wordpress\/auto-sync-files-from-a-private-repo-to-a-public-repo-with-github-actions-7199\/","title":{"rendered":"Auto-Sync Files from a Private Repo to a Public Repo with GitHub Actions"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/yBarn1\/Images\/blob\/main\/produce\/red-tomatoes-produce-box.jpg?raw=true\" alt=\"\" style=\"width:auto;height:500px\"\/><\/figure>\n\n\n<p><div class=\"github-readme-container markdown-body\"><div id=\"file\" class=\"md\" data-path=\"GitHub\/github-actions-ko.md\"><article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><div class=\"markdown-heading\" dir=\"auto\"><h1 class=\"heading-element\" dir=\"auto\">Auto-Sync Files from a Private Repo to a Public Repo with GitHub Actions<\/h1><a id=\"user-content-auto-sync-files-from-a-private-repo-to-a-public-repo-with-github-actions\" class=\"anchor\" aria-label=\"Permalink: Auto-Sync Files from a Private Repo to a Public Repo with GitHub Actions\" href=\"#auto-sync-files-from-a-private-repo-to-a-public-repo-with-github-actions\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Rev. 18 | Created: 2026-07-18 | Updated: 2026-09-07 23:06 UTC<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">1. Purpose<\/h2><a id=\"user-content-1-purpose\" class=\"anchor\" aria-label=\"Permalink: 1. Purpose\" href=\"#1-purpose\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Private repository \uc758 \uc9c0\uc815\ud55c file \uacfc folder \ub97c public repository \ub85c \uc790\ub3d9 \ub3d9\uae30\ud654\ud55c\ub2e4. \uc774 \ubb38\uc11c\uc5d0\uc11c\n<code>&lt;SOURCE_REPO&gt;<\/code> \ub294 \uc6d0\ubcf8\uc774 \ub418\ub294 private repository \ub97c \uac00\ub9ac\ud0a4\uace0, <code>&lt;TARGET_REPO&gt;<\/code> \ub294 \ubcf5\uc0ac\ubcf8\uc744 \ubc1b\ub294\npublic repository \ub97c \uac00\ub9ac\ud0a8\ub2e4. \ubb38\uc11c\uc5d0\uc11c \uc0ac\uc6a9\ud55c \uc6a9\uc5b4\uc758 \uc815\uc758\ub294\n<a href=\"#appendix-a-terminology\">Appendix A. Terminology<\/a> \uc5d0 \uc815\ub9ac\ud55c\ub2e4.<\/p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"[private] &lt;SOURCE_REPO&gt;                   [public] &lt;TARGET_REPO&gt;\n  |- docs\/setup-guide.md         ----&gt;      |- docs\/setup-guide.md\n  +- shared\/**                   ----&gt;      +- shared\/**\"><pre lang=\"text\" class=\"notranslate\"><code>&#91;private&#93; &lt;SOURCE_REPO&gt;                   &#91;public&#93; &lt;TARGET_REPO&gt;\n  |- docs\/setup-guide.md         ----&gt;      |- docs\/setup-guide.md\n  +- shared\/**                   ----&gt;      +- shared\/**\n<\/code><\/pre><\/div>\n<p dir=\"auto\">Fig 1. One-way synchronization from the source repository to the target repository.<\/p>\n<p dir=\"auto\">Private repository \uc5d0 GitHub Actions workflow \ub97c \ub450\uace0, workflow \uc758 <code>paths:<\/code> \uc5d0 \uc9c0\uc815\ud55c file \uc774\ub098\nfolder \uac00 \ubc14\ub014 \ub54c\ub9c8\ub2e4 workflow \uac00 \uc2e4\ud589\ub418\uc5b4 public repository \ub85c push \ud55c\ub2e4. Trigger \ub294 markdown\nfile \uc5d0 \uad6d\ud55c\ub418\uc9c0 \uc54a\uc73c\uba70, \uc9c0\uc815\ud55c \uacbd\ub85c\uc774\uba74 \uc5b4\ub5a4 \uc885\ub958\uc758 file \uc774\ub098 folder \ub4e0 \ub300\uc0c1\uc774 \ub41c\ub2e4.<\/p>\n<p dir=\"auto\">\ub3d9\uae30\ud654\ub294 \uc6d0\ubcf8\uc5d0\uc11c \ubcf5\uc0ac\ubcf8\uc73c\ub85c \ud5a5\ud558\ub294 \ud55c \ubc29\ud5a5\uc774\ub2e4. \ubcf5\uc0ac\ubcf8\uc740 push \ud560 \ub54c\ub9c8\ub2e4 \uc6d0\ubcf8 \ub0b4\uc6a9\uc73c\ub85c\n\ub36e\uc5b4\uc368\uc9c0\ubbc0\ub85c \uc9c1\uc811 \uc218\uc815\ud558\uc9c0 \uc54a\ub294\ub2e4. \ub300\uc0c1 repository \uc5d0 \uc6d0\ub798 \uc788\ub358 \ub2e4\ub978 file \uc740 \ubcf5\uc0ac \ub300\uc0c1\uc5d0\n\ud3ec\ud568\ub418\uc9c0 \uc54a\uc73c\ubbc0\ub85c \uadf8\ub300\ub85c \uc720\uc9c0\ub41c\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">2. Deploy Key Authentication<\/h2><a id=\"user-content-2-deploy-key-authentication\" class=\"anchor\" aria-label=\"Permalink: 2. Deploy Key Authentication\" href=\"#2-deploy-key-authentication\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Actions \uac00 \uae30\ubcf8 \uc81c\uacf5\ud558\ub294 <code>GITHUB_TOKEN<\/code> \uc740 \uc790\uae30 repository \uc548\uc5d0\uc11c\ub9cc \uad8c\ud55c\uc774 \uc788\uc73c\ubbc0\ub85c, \ub2e4\ub978\nrepository \ub85c push \ud558\ub824\uba74 \ubcc4\ub3c4 \uc778\uc99d\uc774 \ud544\uc694\ud558\ub2e4. \uc5ec\uae30\uc11c\ub294 deploy key \ub97c \uc0ac\uc6a9\ud55c\ub2e4.<\/p>\n<p dir=\"auto\">Table 1. Deploy key versus fine-grained PAT.<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th>Aspect<\/th>\n<th>Deploy key<\/th>\n<th>Fine-grained PAT<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Expiry<\/td>\n<td>\uc5c6\uc73c\ubbc0\ub85c \uac31\uc2e0\uc774 \ud544\uc694\ud558\uc9c0 \uc54a\ub2e4<\/td>\n<td>\uc788\uc73c\ubbc0\ub85c \uc8fc\uae30\uc801\uc73c\ub85c \uac31\uc2e0\ud55c\ub2e4<\/td>\n<\/tr>\n<tr>\n<td>Scope<\/td>\n<td>Repository \ud55c \uac1c\ub85c \uace0\uc815\ub41c\ub2e4<\/td>\n<td>\uc5ec\ub7ec repository \ub97c \uc9c0\uc815\ud560 \uc218 \uc788\ub2e4<\/td>\n<\/tr>\n<tr>\n<td>Mechanism<\/td>\n<td>SSH key pair \ub97c \uc4f4\ub2e4<\/td>\n<td>Token \ubb38\uc790\uc5f4\uc744 \uc4f4\ub2e4<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">\ud558\ub098\uc758 SSH key \ub294 deploy key \ub85c repository \ud55c \uac1c\uc5d0\ub9cc \ub4f1\ub85d\ud560 \uc218 \uc788\uc73c\ubbc0\ub85c, secret \uc774\ub984\uc740 \ub300\uc0c1\nrepository \ub97c \ub4dc\ub7ec\ub0b4\ub294 <code>TARGET_DEPLOY_KEY<\/code> \ud615\ud0dc\ub85c \uc9d3\ub294\ub2e4. \ub300\uc0c1 repository \uac00 \ub298\uc5b4\ub098\uba74 \ub300\uc0c1 \ud55c\n\uac1c\ub2f9 key pair \ud55c \uc138\ud2b8\ub97c \uc0c8\ub85c \ub9cc\ub4e0\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">2.1. Setup Steps<\/h3><a id=\"user-content-21-setup-steps\" class=\"anchor\" aria-label=\"Permalink: 2.1. Setup Steps\" href=\"#21-setup-steps\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Deploy key \ub294 \uacc4\uc815 \uc124\uc815\uc774 \uc544\ub2c8\ub77c \ub300\uc0c1 repository \uc758 Settings \ud0ed\uc5d0\uc11c Security \uc601\uc5ed\uc758 Deploy keys\n\ub85c \ub4e4\uc5b4\uac00 \ub4f1\ub85d\ud55c\ub2e4.<\/p>\n<ol dir=\"auto\">\n<li>\n<p dir=\"auto\">\ub85c\uceec terminal \uc5d0\uc11c key pair \ub97c \uc0dd\uc131\ud55c\ub2e4.<\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"ssh-keygen -t ed25519 -C &quot;sync-to-target-repo&quot; -f sync_key -N &quot;&quot;\"><pre>ssh-keygen -t ed25519 -C <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>sync-to-target-repo<span class=\"pl-pds\">\"<\/span><\/span> -f sync_key -N <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span><span class=\"pl-pds\">\"<\/span><\/span><\/pre><\/div>\n<p dir=\"auto\">\ube44\uacf5\uac1c key \uc778 <code>sync_key<\/code> \uc640 \uacf5\uac1c key \uc778 <code>sync_key.pub<\/code> \ub450 file \uc774 \uc0dd\uc131\ub41c\ub2e4.<\/p>\n<\/li>\n<li>\n<p dir=\"auto\">\uacf5\uac1c key \ub97c \ub300\uc0c1 repository \uc5d0 \ub4f1\ub85d\ud55c\ub2e4. <code>&lt;TARGET_REPO&gt;<\/code> \uc758 Settings \uc5d0\uc11c Deploy keys \ub85c \ub4e4\uc5b4\uac00\nAdd deploy key \ub97c \ub204\ub974\uace0, Key \ud56d\ubaa9\uc5d0 <code>sync_key.pub<\/code> \uc758 \ub0b4\uc6a9\uc744 \ubd99\uc5ec \ub123\uc740 \ub4a4 Allow write access \ub97c\n\uccb4\ud06c\ud55c\ub2e4. \uc774 \ud56d\ubaa9\uc744 \uccb4\ud06c\ud574\uc57c push \uac00 \uac00\ub2a5\ud558\ub2e4.<\/p>\n<\/li>\n<li>\n<p dir=\"auto\">\ube44\uacf5\uac1c key \ub97c \uc6d0\ubcf8 repository \uc5d0 secret \uc73c\ub85c \ub4f1\ub85d\ud55c\ub2e4. <code>&lt;SOURCE_REPO&gt;<\/code> \uc758 Settings \uc5d0\uc11c Secrets\nand variables \uc758 Actions \ub85c \ub4e4\uc5b4\uac00 New repository secret \uc744 \ub204\ub974\uace0, \uc774\ub984\uc740 <code>TARGET_DEPLOY_KEY<\/code>\n\ub85c \ud558\uba70 \uac12\uc740 <code>sync_key<\/code> file \uc758 \uc804\uccb4 \ub0b4\uc6a9\uc744 \ub123\ub294\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<p dir=\"auto\">\ube44\uacf5\uac1c key file \uc778 <code>sync_key<\/code> \ub294 secret \uc73c\ub85c \ub4f1\ub85d\ud55c \ub4a4 \ub85c\uceec\uc5d0\uc11c \uc0ad\uc81c\ud55c\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">3. Workflow File<\/h2><a id=\"user-content-3-workflow-file\" class=\"anchor\" aria-label=\"Permalink: 3. Workflow File\" href=\"#3-workflow-file\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\uc6d0\ubcf8 repository \uc758 <code>.github\/workflows\/sync-target.yml<\/code> \ub85c \uc800\uc7a5\ud55c\ub2e4.<\/p>\n<p dir=\"auto\">Trigger \uc778 <code>paths:<\/code> \uc640 \uc2e4\uc81c \ubcf5\uc0ac\ub97c \uc218\ud589\ud558\ub294 <code>Copy files<\/code> \ub2e8\uacc4\ub294 \ubcc4\uac1c\ub2e4. <code>paths:<\/code> \ub294 workflow \ub97c\n\uc5b8\uc81c \uc2e4\ud589\ud560\uc9c0\ub9cc \uc815\ud558\uace0, \ubb34\uc5c7\uc744 \ubcf5\uc0ac\ud560\uc9c0\ub294 \ubcf5\uc0ac \ub2e8\uacc4\uac00 \uc815\ud55c\ub2e4. \ub300\uc0c1\uc744 \ucd94\uac00\ud558\ub824\uba74 \uc774 \ub450 \uacf3\uc744 \ud568\uaed8\n\uace0\uce5c\ub2e4.<\/p>\n<p dir=\"auto\">\ubcf5\uc0ac\ub41c file \uc740 \uc6d0\ubcf8\uacfc \uc644\uc804\ud788 \ub3d9\uc77c\ud558\uba70 workflow \uac00 \ub0b4\uc6a9\uc744 \ub367\ubd99\uc774\uac70\ub098 \uace0\uce58\uc9c0 \uc54a\ub294\ub2e4. \ub530\ub77c\uc11c \ub300\uc0c1\nrepository \uc758 file \uc740 \uc6d0\ubcf8\uacfc byte \ub2e8\uc704\ub85c \uc77c\uce58\ud558\uace0, \ubcf5\uc0ac \ub2e8\uacc4\uac00 \ub9e4\ubc88 \uc6d0\ubcf8 \ub0b4\uc6a9\uc73c\ub85c \ub36e\uc73c\ubbc0\ub85c \ub300\uc0c1\n\ucabd\uc5d0\uc11c \uc9c1\uc811 \uc218\uc815\ud55c \ub0b4\uc6a9\uc740 \ub2e4\uc74c \uc2e4\ud589\uc5d0\uc11c \uc0ac\ub77c\uc9c4\ub2e4.<\/p>\n<div class=\"highlight highlight-source-yaml notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# .github\/workflows\/sync-target.yml\nname: Sync files to the public target repo\n\non:\n  push:\n    branches: [main]                       # source branch\n    paths:\n      - 'docs\/setup-guide.md'\n      - 'shared\/**'                        # add more files or folders here\n  workflow_dispatch:                       # manual run from the Actions tab\n\njobs:\n  sync:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout the source repo\n        uses: actions\/checkout@v5\n\n      - name: Checkout the target repo via deploy key\n        uses: actions\/checkout@v5\n        with:\n          repository: &lt;TARGET_REPO&gt;\n          ssh-key: ${{ secrets.TARGET_DEPLOY_KEY }}\n          path: target\n\n      - name: Copy files\n        run: |\n          # single file\n          mkdir -p target\/docs\n          cp docs\/setup-guide.md target\/docs\/\n\n          # whole folder mirrored\n          mkdir -p target\/shared\n          rsync -av --delete shared\/ target\/shared\/\n\n      - name: Commit and push if changed\n        run: |\n          cd target\n          git config user.name  &quot;github-actions[bot]&quot;\n          git config user.email &quot;github-actions[bot]@users.noreply.github.com&quot;\n          git add -A\n          if git diff --staged --quiet; then\n            echo &quot;No change - skip&quot;\n          else\n            git commit -m &quot;Sync files from the source repo&quot;\n            git push\n          fi\"><pre><span class=\"pl-c\"><span class=\"pl-c\">#<\/span> .github\/workflows\/sync-target.yml<\/span>\n<span class=\"pl-ent\">name<\/span>: <span class=\"pl-s\">Sync files to the public target repo<\/span>\n\n<span class=\"pl-ent\">on<\/span>:\n  <span class=\"pl-ent\">push<\/span>:\n    <span class=\"pl-ent\">branches<\/span>: <span class=\"pl-s\">&#91;main&#93;                       <\/span><span class=\"pl-c\"><span class=\"pl-c\">#<\/span> source branch<\/span>\n    <span class=\"pl-ent\">paths<\/span>:\n      - <span class=\"pl-s\"><span class=\"pl-pds\">'<\/span>docs\/setup-guide.md<span class=\"pl-pds\">'<\/span><\/span>\n      - <span class=\"pl-s\"><span class=\"pl-pds\">'<\/span>shared\/**<span class=\"pl-pds\">'<\/span><\/span>                        <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> add more files or folders here<\/span>\n  <span class=\"pl-ent\">workflow_dispatch<\/span>:                       <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> manual run from the Actions tab<\/span>\n\n<span class=\"pl-ent\">jobs<\/span>:\n  <span class=\"pl-ent\">sync<\/span>:\n    <span class=\"pl-ent\">runs-on<\/span>: <span class=\"pl-s\">ubuntu-latest<\/span>\n    <span class=\"pl-ent\">steps<\/span>:\n      - <span class=\"pl-ent\">name<\/span>: <span class=\"pl-s\">Checkout the source repo<\/span>\n        <span class=\"pl-ent\">uses<\/span>: <span class=\"pl-s\">actions\/checkout@v5<\/span>\n\n      - <span class=\"pl-ent\">name<\/span>: <span class=\"pl-s\">Checkout the target repo via deploy key<\/span>\n        <span class=\"pl-ent\">uses<\/span>: <span class=\"pl-s\">actions\/checkout@v5<\/span>\n        <span class=\"pl-ent\">with<\/span>:\n          <span class=\"pl-ent\">repository<\/span>: <span class=\"pl-s\">&lt;TARGET_REPO&gt;<\/span>\n          <span class=\"pl-ent\">ssh-key<\/span>: <span class=\"pl-s\">${{ secrets.TARGET_DEPLOY_KEY }}<\/span>\n          <span class=\"pl-ent\">path<\/span>: <span class=\"pl-s\">target<\/span>\n\n      - <span class=\"pl-ent\">name<\/span>: <span class=\"pl-s\">Copy files<\/span>\n        <span class=\"pl-ent\">run<\/span>: <span class=\"pl-s\">|<\/span>\n<span class=\"pl-s\">          # single file<\/span>\n<span class=\"pl-s\">          mkdir -p target\/docs<\/span>\n<span class=\"pl-s\">          cp docs\/setup-guide.md target\/docs\/<\/span>\n<span class=\"pl-s\"><\/span>\n<span class=\"pl-s\">          # whole folder mirrored<\/span>\n<span class=\"pl-s\">          mkdir -p target\/shared<\/span>\n<span class=\"pl-s\">          rsync -av --delete shared\/ target\/shared\/<\/span>\n<span class=\"pl-s\"><\/span>\n<span class=\"pl-s\"><\/span>      - <span class=\"pl-ent\">name<\/span>: <span class=\"pl-s\">Commit and push if changed<\/span>\n        <span class=\"pl-ent\">run<\/span>: <span class=\"pl-s\">|<\/span>\n<span class=\"pl-s\">          cd target<\/span>\n<span class=\"pl-s\">          git config user.name  \"github-actions&#91;bot&#93;\"<\/span>\n<span class=\"pl-s\">          git config user.email \"github-actions&#91;bot&#93;@users.noreply.github.com\"<\/span>\n<span class=\"pl-s\">          git add -A<\/span>\n<span class=\"pl-s\">          if git diff --staged --quiet; then<\/span>\n<span class=\"pl-s\">            echo \"No change - skip\"<\/span>\n<span class=\"pl-s\">          else<\/span>\n<span class=\"pl-s\">            git commit -m \"Sync files from the source repo\"<\/span>\n<span class=\"pl-s\">            git push<\/span>\n<span class=\"pl-s\">          fi<\/span><\/pre><\/div>\n<p dir=\"auto\">\ub9c8\uc9c0\ub9c9 step \uc758 <code>git diff --staged --quiet<\/code> \ub294 stage \uc5d0 \uc62c\ub77c\uc628 \ubcc0\uacbd\uc774 \uc5c6\uc73c\uba74 \uc131\uacf5\uc744 \ubc18\ud658\ud558\ubbc0\ub85c,\n\ubcf5\uc0ac \uacb0\uacfc\uac00 \uae30\uc874 \ub0b4\uc6a9\uacfc \uac19\uc744 \ub54c\ub294 commit \uacfc push \ub97c \uac74\ub108\ub6f4\ub2e4. \uc774 \uc870\uac74\uc774 \uc5c6\uc73c\uba74 \uc2e4\ud589\ud560 \ub54c\ub9c8\ub2e4 \ube48\ncommit \uc774 \uc313\uc778\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.1. Execution Flow<\/h3><a id=\"user-content-31-execution-flow\" class=\"anchor\" aria-label=\"Permalink: 3.1. Execution Flow\" href=\"#31-execution-flow\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<ol dir=\"auto\">\n<li>Trigger \ub2e8\uacc4\uc5d0\uc11c\ub294 <code>main<\/code> \uc758 <code>paths:<\/code> \uc5d0 \uc9c0\uc815\ud55c file \uc774\ub098 folder \uac00 \ubc14\ub00c\uc5b4 push \ub418\uba74 \uc2e4\ud589\ub418\uba70,\n\uc218\ub3d9 \uc2e4\ud589\ub3c4 \uac00\ub2a5\ud558\ub2e4.<\/li>\n<li>\uc6d0\ubcf8 checkout \ub2e8\uacc4\uc5d0\uc11c\ub294 private repository \ub97c \uc791\uc5c5 folder \ub85c \ubc1b\ub294\ub2e4.<\/li>\n<li>\ub300\uc0c1 checkout \ub2e8\uacc4\uc5d0\uc11c\ub294 deploy key secret \uc73c\ub85c \ub300\uc0c1 repository \ub97c <code>target\/<\/code> \uc73c\ub85c \ubc1b\ub294\ub2e4.<\/li>\n<li>\ubcf5\uc0ac \ub2e8\uacc4\uc5d0\uc11c\ub294 \uc9c0\uc815\ud55c file \uacfc folder \ub97c \ub300\uc0c1 \uc704\uce58\ub85c \ubcf5\uc0ac\ud55c\ub2e4.<\/li>\n<li>Commit \ub2e8\uacc4\uc5d0\uc11c\ub294 \ub0b4\uc6a9\uc774 \ub2ec\ub77c\uc84c\uc744 \ub54c\ub9cc commit \ud558\uace0 push \ud558\uba70, \ub3d9\uc77c\ud558\uba74 \uac74\ub108\ub6f4\ub2e4.<\/li>\n<\/ol>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">4. Multiple Target Handling<\/h2><a id=\"user-content-4-multiple-target-handling\" class=\"anchor\" aria-label=\"Permalink: 4. Multiple Target Handling\" href=\"#4-multiple-target-handling\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Workflow file \ud55c \uac1c\ub85c \uc5ec\ub7ec \ub300\uc0c1\uc744 \ucc98\ub9ac\ud55c\ub2e4. Trigger \uc778 <code>paths:<\/code> \uc640 \ubcf5\uc0ac \uba85\ub839\uc744 \ud568\uaed8 \ub298\ub9ac\uba74 \ub418\uba70,\n\uc138 \uac00\uc9c0 \ubc29\uc2dd\uc774 \uc788\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.1. File List<\/h3><a id=\"user-content-41-file-list\" class=\"anchor\" aria-label=\"Permalink: 4.1. File List\" href=\"#41-file-list\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">File \ub9c8\ub2e4 \ubaa9\uc801\uc9c0\uac00 \ub2e4\ub97c \ub54c \uc4f4\ub2e4.<\/p>\n<div class=\"highlight highlight-source-yaml notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"    paths:\n      - 'docs\/setup-guide.md'\n      - 'docs\/another-guide.md'\"><pre>    <span class=\"pl-ent\">paths<\/span>:\n      - <span class=\"pl-s\"><span class=\"pl-pds\">'<\/span>docs\/setup-guide.md<span class=\"pl-pds\">'<\/span><\/span>\n      - <span class=\"pl-s\"><span class=\"pl-pds\">'<\/span>docs\/another-guide.md<span class=\"pl-pds\">'<\/span><\/span><\/pre><\/div>\n<p dir=\"auto\">\ubcf5\uc0ac \ub2e8\uacc4\uc5d0\uc11c \uac01 file \uc744 \uc6d0\ud558\ub294 \uc704\uce58\ub85c <code>cp<\/code> \ud55c\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.2. Whole Folder Mirroring<\/h3><a id=\"user-content-42-whole-folder-mirroring\" class=\"anchor\" aria-label=\"Permalink: 4.2. Whole Folder Mirroring\" href=\"#42-whole-folder-mirroring\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\ud2b9\uc815 folder \uc804\uccb4\ub97c \ub0b4\ubcf4\ub0bc \ub54c \uc4f4\ub2e4.<\/p>\n<div class=\"highlight highlight-source-yaml notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"    paths:\n      - 'shared\/**'\"><pre>    <span class=\"pl-ent\">paths<\/span>:\n      - <span class=\"pl-s\"><span class=\"pl-pds\">'<\/span>shared\/**<span class=\"pl-pds\">'<\/span><\/span><\/pre><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"mkdir -p target\/shared\nrsync -av --delete shared\/ target\/shared\/\"><pre>mkdir -p target\/shared\nrsync -av --delete shared\/ target\/shared\/<\/pre><\/div>\n<p dir=\"auto\"><code>rsync -av --delete<\/code> \ub294 folder \uc548\uc758 \ubaa8\ub4e0 file \uacfc \ud558\uc704 folder \ub97c \ub300\uc0c1\uc5d0 \ubcf5\uc0ac\ud558\uace0 \uac31\uc2e0\ud558\uba70, \uc6d0\ubcf8\uc5d0\uc11c\n\uc0ad\uc81c\ub41c file \uc740 \ub300\uc0c1\uc5d0\uc11c\ub3c4 \uc0ad\uc81c\ud574 \uc591\ucabd\uc744 \uc644\uc804\ud788 \ub3d9\uc77c\ud558\uac8c \ub9de\ucd98\ub2e4. <code>--delete<\/code> \ub97c \ube7c\uba74 \ucd94\uac00\uc640 \uc218\uc815\ub9cc\n\ubc18\uc601\ub418\uace0 \uc0ad\uc81c\ub294 \ubc18\uc601\ub418\uc9c0 \uc54a\ub294\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.3. Pattern Matching<\/h3><a id=\"user-content-43-pattern-matching\" class=\"anchor\" aria-label=\"Permalink: 4.3. Pattern Matching\" href=\"#43-pattern-matching\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\ud2b9\uc815 folder \uc758 \ud2b9\uc815 \ud655\uc7a5\uc790\ub9cc \ub300\uc0c1\uc73c\ub85c \uc0bc\uc744 \ub54c \uc4f4\ub2e4.<\/p>\n<div class=\"highlight highlight-source-yaml notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"    paths:\n      - 'docs\/*.md'\"><pre>    <span class=\"pl-ent\">paths<\/span>:\n      - <span class=\"pl-s\"><span class=\"pl-pds\">'<\/span>docs\/*.md<span class=\"pl-pds\">'<\/span><\/span><\/pre><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">5. Difference from PAT<\/h2><a id=\"user-content-5-difference-from-pat\" class=\"anchor\" aria-label=\"Permalink: 5. Difference from PAT\" href=\"#5-difference-from-pat\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\ub300\uc0c1 repository \ub97c checkout \ud558\ub294 \ud55c \uc904\ub9cc \ub2e4\ub974\ub2e4. Deploy key \ub294\n<code>ssh-key: ${{ secrets.TARGET_DEPLOY_KEY }}<\/code> \ub97c \uc4f0\uace0, PAT \uc740 <code>token: ${{ secrets.TARGET_PAT }}<\/code> \ub97c\n\uc4f4\ub2e4.<\/p>\n<p dir=\"auto\"><code>ssh-key<\/code> \ub97c \uc4f0\uba74 checkout \uc774 SSH remote \ub85c \uc790\ub3d9 \uc124\uc815\ub418\uc5b4 \uc774\ud6c4\uc758 <code>git push<\/code> \uac00 \uadf8 key \ub85c\n\uc778\uc99d\ub418\ubbc0\ub85c, \ubcc4\ub3c4\uc758 ssh-agent \uc124\uc815\uc774 \ud544\uc694 \uc5c6\ub2e4.<\/p>\n<hr>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix A. Terminology<\/h2><a id=\"user-content-appendix-a-terminology\" class=\"anchor\" aria-label=\"Permalink: Appendix A. Terminology\" href=\"#appendix-a-terminology\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<ul dir=\"auto\">\n<li><strong>CI\/CD (Continuous Integration \/ Continuous Delivery)<\/strong>: Code \ubcc0\uacbd\uc744 \uc790\ub3d9\uc73c\ub85c build \ud558\uace0 test \ud558\uba70 \ubc30\ud3ec\ud558\ub294 \uac1c\ubc1c \uc790\ub3d9\ud654 \ubc29\uc2dd\uc774\ub2e4.<\/li>\n<li><strong>Deploy key<\/strong>: \ud2b9\uc815 repository \ud55c \uac1c\uc5d0\ub9cc \uc5f0\uacb0\ub418\ub294 SSH \uacf5\uac1c key \ub2e4. \uc4f0\uae30 \uad8c\ud55c\uc744 \ubd80\uc5ec\ud558\uba74 \uadf8 repository \uc5d0 push \ud560 \uc218 \uc788\uace0 \ub9cc\ub8cc\uac00 \uc5c6\ub2e4. \uacc4\uc815 \uc124\uc815\uc774 \uc544\ub2c8\ub77c \ud574\ub2f9 repository \uc758 Settings \uc5d0\uc11c \ub4f1\ub85d\ud558\uba70, \uac19\uc740 key \ub97c \ub450 repository \uc5d0 deploy key \ub85c \ub4f1\ub85d\ud560 \uc218 \uc5c6\ub2e4.<\/li>\n<li><strong>Ed25519<\/strong>: SSH key \uc0dd\uc131\uc5d0 \uc4f0\ub294 \ucd5c\uc2e0 \ud0c0\uc6d0\uace1\uc120 \uc554\ud638 algorithm \uc774\ub2e4. \uc9e7\uace0 \uc548\uc804\ud574 RSA \ubcf4\ub2e4 \uad8c\uc7a5\ub41c\ub2e4.<\/li>\n<li><strong>git diff --staged<\/strong>: Stage \uc5d0 \uc62c\ub77c\uc628 \ubcc0\uacbd\uc744 \ubcf4\uc5ec \uc8fc\ub294 \uba85\ub839\uc774\ub2e4. <code>--quiet<\/code> \ub97c \ubd99\uc774\uba74 \ucd9c\ub825 \uc5c6\uc774 \ubcc0\uacbd \uc720\ubb34\ub9cc \uc885\ub8cc code \ub85c \uc54c\ub824 \uc8fc\ubbc0\ub85c \uc870\uac74 \ubd84\uae30\uc5d0 \uc4f4\ub2e4.<\/li>\n<li><strong>GitHub Actions<\/strong>: GitHub \uc5d0 \ub0b4\uc7a5\ub41c CI\/CD \uc790\ub3d9\ud654 \ub3c4\uad6c\uc774\uba70 push \uac19\uc740 event \uc5d0 \ubc18\uc751\ud574 workflow \ub97c \uc2e4\ud589\ud55c\ub2e4.<\/li>\n<li><strong>GITHUB_TOKEN<\/strong>: Workflow \uc2e4\ud589 \uc2dc GitHub \uc774 \uc790\ub3d9 \ubc1c\uae09\ud558\ub294 \uc784\uc2dc token \uc774\ub2e4. \ud574\ub2f9 repository \ub0b4\ubd80 \uc791\uc5c5\uc5d0\ub9cc \uad8c\ud55c\uc774 \uc788\uc5b4 \ub2e4\ub978 repository \uc5d0\ub294 \uc4f8 \uc218 \uc5c6\ub2e4.<\/li>\n<li><strong>Job<\/strong>: Workflow \uc548\uc5d0\uc11c \ud558\ub098\uc758 runner \uc704\uc5d0 \ubc30\uc815\ub418\uc5b4 \uc2e4\ud589\ub418\ub294 \uc791\uc5c5 \ub2e8\uc704\uc774\uba70, \uc5ec\ub7ec step \uc744 \uc21c\uc11c\ub300\ub85c \uc218\ud589\ud55c\ub2e4.<\/li>\n<li><strong>PAT (Personal Access Token)<\/strong>: GitHub \uacc4\uc815 \ube44\ubc00\ubc88\ud638 \ub300\uc2e0 \uc0ac\uc6a9\ud558\ub294 \uc778\uc99d\uc6a9 token \ubb38\uc790\uc5f4\uc774\ub2e4. \uad8c\ud55c \ubc94\uc704\uc640 \ub9cc\ub8cc\uc77c\uc744 \uc9c0\uc815\ud560 \uc218 \uc788\uc73c\uba70, fine-grained PAT \uc740 \ud2b9\uc815 repository \uc640 \ud2b9\uc815 \uad8c\ud55c\uc73c\ub85c \ubc94\uc704\ub97c \uc881\ud78c \ucd5c\uc2e0 \ubc29\uc2dd\uc774\ub2e4.<\/li>\n<li><strong>paths<\/strong>: <code>on: push:<\/code> \uc544\ub798\uc758 trigger filter \ub2e4. \uc5ec\uae30\uc5d0 \uc9c0\uc815\ud55c file \uc774\ub098 folder \uac00 \ubc14\ub014 \ub54c\ub9cc workflow \uac00 \uc2e4\ud589\ub418\uba70 \ud655\uc7a5\uc790\uc5d0 \uad6d\ud55c\ub418\uc9c0 \uc54a\ub294\ub2e4.<\/li>\n<li><strong>Repository<\/strong>: Code \uc640 file \uacfc history \ub97c \ub2f4\ub294 \uc800\uc7a5 \ub2e8\uc704\uc774\uba70 private \uacfc public \uc73c\ub85c \uad6c\ubd84\ub41c\ub2e4.<\/li>\n<li><strong>rsync<\/strong>: Folder \ub2e8\uc704\ub85c file \uc744 \ub3d9\uae30\ud654\ud558\ub294 \uba85\ub839\uc774\ub2e4. <code>-a<\/code> \ub294 \ud558\uc704 \uad6c\uc870\ub97c \ubcf4\uc874\ud558\uace0, <code>-v<\/code> \ub294 log \ub97c \ucd9c\ub825\ud558\uba70, <code>--delete<\/code> \ub294 \uc6d0\ubcf8\uc5d0\uc11c \uc9c0\uc6b4 file \uc744 \ub300\uc0c1\uc5d0\uc11c\ub3c4 \uc9c0\uc6b4\ub2e4.<\/li>\n<li><strong>Secret<\/strong>: Repository \ub098 organization \uc5d0 \uc800\uc7a5\ud558\ub294 \uc554\ud638\ud654\ub41c \uac12\uc774\ub2e4. Workflow \uc548\uc5d0\uc11c <code>${{ secrets.NAME }}<\/code> \uc73c\ub85c \ucc38\uc870\ud558\uba70 log \uc5d0 \ub178\ucd9c\ub418\uc9c0 \uc54a\uace0 \uc774\ub984\uc740 \ub300\uc18c\ubb38\uc790\ub97c \uad6c\ubd84\ud55c\ub2e4.<\/li>\n<li><strong>SSH (Secure Shell)<\/strong>: Network \ub85c \uc6d0\uaca9 server \uc5d0 \uc548\uc804\ud558\uac8c \uc811\uc18d\ud558\uace0 \ud1b5\uc2e0\ud558\ub294 \uc554\ud638\ud654 protocol \uc774\ub2e4. GitHub \uc740 SSH key pair \ub85c push \uc640 pull \uc778\uc99d\uc744 \uc9c0\uc6d0\ud55c\ub2e4.<\/li>\n<li><strong>SSH key pair<\/strong>: \uc9dd\uc744 \uc774\ub8e8\ub294 \ub450 \uac1c\uc758 key \ub2e4. \uacf5\uac1c key \ub294 server \uc5d0 \ub4f1\ub85d\ud558\uace0 \ube44\uacf5\uac1c key \ub294 \ubcf8\uc778\ub9cc \ubcf4\uad00\ud558\uba70, \uacf5\uac1c key \ub85c \uc7a0\uadfc \uac83\uc740 \uc9dd\uc774 \ub418\ub294 \ube44\uacf5\uac1c key \ub85c\ub9cc \uc5f4 \uc218 \uc788\uc5b4 \uc2e0\uc6d0\uc774 \uc99d\uba85\ub41c\ub2e4.<\/li>\n<li><strong>ssh-agent<\/strong>: SSH \ube44\uacf5\uac1c key \ub97c \uba54\ubaa8\ub9ac\uc5d0 \uc62c\ub824 \ub450\uace0 \uc778\uc99d\uc5d0 \uc4f0\uac8c \ud574 \uc8fc\ub294 program \uc774\ub2e4.<\/li>\n<li><strong>Step<\/strong>: Job \uc744 \uc774\ub8e8\ub294 \uc2e4\ud589 \ub2e8\uc704\uc774\uba70, action \uc744 \ubd80\ub974\uac70\ub098 shell \uba85\ub839\uc744 \uc2e4\ud589\ud55c\ub2e4.<\/li>\n<li><strong>Workflow<\/strong>: <code>.github\/workflows\/<\/code> \uc548\uc758 YAML file \ub85c \uc815\uc758\ud558\ub294 \uc790\ub3d9\ud654 \uc791\uc5c5 \ubb36\uc74c\uc774\uba70 \ud558\ub098 \uc774\uc0c1\uc758 job \uacfc step \uc73c\ub85c \uad6c\uc131\ub41c\ub2e4.<\/li>\n<li><strong>workflow_dispatch<\/strong>: Workflow \ub97c Actions \ud0ed\uc5d0\uc11c \uc218\ub3d9\uc73c\ub85c \uc2e4\ud589\ud560 \uc218 \uc788\uac8c \ud574 \uc8fc\ub294 trigger \ub2e4.<\/li>\n<li><strong>YAML (YAML Ain't Markup Language)<\/strong>: \ub4e4\uc5ec\uc4f0\uae30\ub85c \uad6c\uc870\ub97c \ud45c\ud604\ud558\ub294 \uc0ac\ub78c\uc774 \uc77d\uae30 \uc26c\uc6b4 \uc124\uc815 file \ud615\uc2dd\uc774\uba70 workflow \uc815\uc758\uc5d0 \uc0ac\uc6a9\ub41c\ub2e4.<\/li>\n<\/ul>\n<\/article><\/div><\/div><\/p>\n<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>A GitHub Actions workflow that pushes named files and folders from a private repository into a public one whenever those paths change. Authentication uses a deploy key on the target repository, because the built-in GITHUB_TOKEN reaches only its own repo. The copy is one-way and is overwritten on every push.<\/p>\n","protected":false},"author":4,"featured_media":7200,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","fifu_image_url":"","fifu_image_alt":"","iawp_total_views":6,"footnotes":""},"categories":[378,10],"tags":[386],"class_list":["post-7199","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-github","category-software-slug","tag-github-hosted"],"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":0,"sum_votes":0},"jetpack_featured_media_url":"https:\/\/ykim.synology.me\/wordpress\/wp-content\/uploads\/2026\/09\/red-tomatoes-produce-box.jpg","_links":{"self":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/7199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/comments?post=7199"}],"version-history":[{"count":1,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/7199\/revisions"}],"predecessor-version":[{"id":7201,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/7199\/revisions\/7201"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/media\/7200"}],"wp:attachment":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/media?parent=7199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/categories?post=7199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/tags?post=7199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}