|
1 | | -# This is a basic workflow to help you get started with Actions |
| 1 | +name: SyncToReferenceSite |
2 | 2 |
|
3 | | -name: CopyChangesToMainRepo |
4 | | - |
5 | | -# Controls when the action will run. |
| 3 | +# Copies this repo's tree into reference.groupdocs.com at |
| 4 | +# content/sites/groupdocs/signature/ on `main` — the site's single deploy branch. |
| 5 | +# |
| 6 | +# The commit message carries [deploy-qa], so the site deploys it to STAGING only |
| 7 | +# (reference2.groupdocs.com). To publish it live, run the PromoteToProduction workflow. |
6 | 8 | on: |
7 | | - # Triggers the workflow on push or pull request events but only for the main branch |
8 | 9 | push: |
9 | 10 | branches: [ main ] |
10 | | - pull_request: |
11 | | - branches: [ main ] |
12 | | - |
13 | | - # Allows you to run this workflow manually from the Actions tab |
14 | 11 | workflow_dispatch: |
15 | 12 |
|
16 | | -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
17 | 13 | jobs: |
18 | | - # This workflow contains a single job called "build" |
19 | 14 | build: |
20 | | - # The type of runner that the job will run on |
21 | 15 | runs-on: ubuntu-latest |
22 | | - |
23 | | - # Steps represent a sequence of tasks that will be executed as part of the job |
24 | 16 | steps: |
25 | 17 | - name: Copycat |
26 | | - uses: andstor/copycat-action@v3 |
| 18 | + uses: andstor/copycat-action@c2b0316e9ab883478a4a7d40a4fcb03d17f281aa # v3 |
27 | 19 | with: |
28 | 20 | personal_token: ${{ secrets.REPO_TOKEN }} |
29 | 21 | src_path: /. |
| 22 | + # ⚠️ The trailing slash is load-bearing. copycat empties `${DST_PATH%/*}`, which is |
| 23 | + # `.../signature` only while the trailing slash is present — drop it and that becomes |
| 24 | + # `.../groupdocs`, wiping EVERY product's content from the site repo. |
30 | 25 | dst_path: /content/sites/groupdocs/signature/ |
31 | 26 | dst_owner: groupdocs |
32 | 27 | dst_repo_name: reference.groupdocs.com |
33 | 28 | dst_branch: main |
34 | 29 | src_branch: main |
35 | 30 | clean: true |
| 31 | + commit_message: 'Update file(s) from ${{ github.repository }} [deploy-qa]' |
0 commit comments