From 84d61c37efd82eab5d2e4abe330843516e474825 Mon Sep 17 00:00:00 2001 From: "James M. Greene" Date: Thu, 23 Sep 2021 13:52:44 -0500 Subject: [PATCH] Untar, append, and retar the deployment app archive (#21690) --- .github/workflows/staging-deploy-pr.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/staging-deploy-pr.yml b/.github/workflows/staging-deploy-pr.yml index 2bf2a513bd..f9f2fae786 100644 --- a/.github/workflows/staging-deploy-pr.yml +++ b/.github/workflows/staging-deploy-pr.yml @@ -139,14 +139,6 @@ jobs: DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }} GIT_BRANCH: ${{ github.event.workflow_run.head_branch }} - - if: ${{ github.repository == 'github/docs-internal' }} - name: Create an archive for early access - run: | - tar -c --file=early-access.tar \ - assets/ \ - content/ \ - data/ - # Download the previously built "app.tar" - name: Download build artifact uses: dawidd6/action-download-artifact@b9571484721e8187f1fd08147b497129f8972c74 @@ -156,10 +148,20 @@ jobs: name: pr_build path: ./ - # Append "early-access.tar" into "app.tar" - if: ${{ github.repository == 'github/docs-internal' }} - name: Concatenate the archives - run: tar -A --file=app.tar early-access.tar + name: Extract user-changes to temp directory + run: | + tar -x --file=app.tar -C "$RUNNER_TEMP/" + rm app.tar + + # Append early access content into the temp directory + - if: ${{ github.repository == 'github/docs-internal' }} + name: Merge in the early access content + run: rsync -ai assets content data "$RUNNER_TEMP/" + + - if: ${{ github.repository == 'github/docs-internal' }} + name: Create an updated archive + run: tar -c --file app.tar "$RUNNER_TEMP/" # Create "app.tar.gz" and delete "app.tar" - name: Create a gzipped archive