diff --git a/.github/workflows/fg-sync-repos.yml b/.github/workflows/fg-sync-repos.yml index 940349c..0d0aa2b 100644 --- a/.github/workflows/fg-sync-repos.yml +++ b/.github/workflows/fg-sync-repos.yml @@ -2,6 +2,15 @@ name: Floodgate Repo Sync on: workflow_dispatch: + inputs: + syncBranch: + description: 'Branch to sync' + required: true + default: 'stage' + type: choice + options: + - 'stage' + - 'main' jobs: build: @@ -17,21 +26,32 @@ jobs: repositories: "bacom-pink" - name: Checkout Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: - persist-credentials: false + ref: ${{ inputs.syncBranch }} - - name: Clone Floodgate Repository + - name: Clone Floodgate Repository and Checkout Selected Branch run: | git clone https://github.com/adobecom/bacom-pink.git ../bacom-pink + cd ../bacom-pink + git checkout $FG_SYNC_BRANCH + echo "bacom-pink branch" + git branch + cd ../bacom + echo "bacom branch" + git branch + env: + FG_SYNC_BRANCH: ${{ inputs.syncBranch }} - name: Overwrite floodgate repo files with latest from source repo run: | - rsync -av --exclude='fstab.yaml' --exclude='.github' --exclude='.git' --exclude='.idea' --exclude='tools/sidekick/config.json' ./ ../bacom-pink/ + rsync -av --exclude='fstab.yaml' --exclude='.github' --exclude='.kodiak' --exclude='.git' --exclude='.idea' --exclude='.husky' --exclude='.vscode' --exclude='tools/sidekick/config.json' ./ ../bacom-pink/ - name: Commit and Push Changes to Floodgate Repository run: | cd ../bacom-pink + echo "bacom-pink branch" + git branch git config user.email "$FG_SYNC_BOT_EMAIL" git config user.name "$FG_SYNC_BOT_NAME" git status @@ -39,8 +59,9 @@ jobs: git remote -v git add . git commit -m "Syncing bacom to bacom-pink" - git push origin main --force + git push origin $FG_SYNC_BRANCH --force env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} FG_SYNC_BOT_EMAIL: ${{ secrets.FG_SYNC_BOT_EMAIL }} FG_SYNC_BOT_NAME: ${{ secrets.FG_SYNC_BOT_NAME }} + FG_SYNC_BRANCH: ${{ inputs.syncBranch }} diff --git a/scripts/scripts.js b/scripts/scripts.js index 38b920f..3c06f70 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -128,6 +128,7 @@ const CONFIG = { /business\.adobe\.com\/(\w\w(_\w\w)?\/)?blog(\/.*)?/, ], useDotHtml: true, + dynamicNavKey: 'bacom', }; const eagerLoad = (img) => { diff --git a/tools/sidekick/config.json b/tools/sidekick/config.json index ec710f5..f490d0e 100644 --- a/tools/sidekick/config.json +++ b/tools/sidekick/config.json @@ -2,6 +2,17 @@ "project": "BACOM", "host": "business.adobe.com", "plugins": [ + { + "id": "path", + "title": "Path", + "environments": [ "edit" ], + "url": "https://milo.adobe.com/tools/path-finder", + "isPalette": true, + "passReferrer": true, + "passConfig": true, + "paletteRect": "top: 50%; left: 50%; transform: translate(-50%,-50%); height: 84px; width: 900px; overflow: hidden; border-radius: 6px; box-shadow: 0 20px 35px 0px rgba(0, 0, 0, 0.5);", + "includePaths": [ "**.docx**", "**.xlsx**" ] + }, { "id": "library", "title": "Library",