This is an automated email from the ASF dual-hosted git repository. tobous pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/db-jdo-site.git
commit fa617940273f23cea13ca8d49d7ae67f57839623 Author: Tobias Bouschen <tobias.bousc...@googlemail.com> AuthorDate: Tue Feb 9 14:29:46 2021 +0100 Split up publishing stage of recreate action into multiple steps Splits up the publishing stage of the action to recreate the publishing branch into multiple steps. This makes it easier to determine where an issue occurred during debugging. Furthermore, it makes the logs easier to digest as they are automatically grouped by steps. Makes the steps moving the site build results to the correct location verbose to make debugging easier. Also introduces the multi-line syntax for the site build to make the used syntax more uniform. --- .github/workflows/recreate-site-branch.yml | 43 +++++++++++++++++------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/.github/workflows/recreate-site-branch.yml b/.github/workflows/recreate-site-branch.yml index 100cba1..f451be8 100644 --- a/.github/workflows/recreate-site-branch.yml +++ b/.github/workflows/recreate-site-branch.yml @@ -33,7 +33,8 @@ jobs: - name: Build Site - run: mvn clean compile + run: | + mvn clean compile # Determines the short sha of the commit that triggered the build @@ -60,33 +61,39 @@ jobs: git config user.email $author_email - # Publishes the site build results to a separate orphan branch - # - # Creates and checks out a new orphan branch - # Creates a single commit containing only the site build artifacts and site configuration files located in the root directory - # The commit is created with the author data set up in the previous step - # Force-pushes the created branch, overwriting the previously published site build - - name: Publish site branch + # Creates and checks out a new orphan branch used to publish the site + - name: Create Orphan Site Branch if: success() run: | - echo "Creating orphan branch" git checkout --orphan ${{ env.BRANCH_NAME }} - echo - echo "Dropping content other than site data" + + # Drops all content other than the site data from the workspace + # This creates a minimal state that only contains the website build results + - name: Drop Content Other Than Site Data + if: success() + run: | git reset rm .gitignore git add target/site git add .asf.yaml.publish .htaccess git clean -df + + + # Moves the site content and site configuration to the correct location + - name: Move Content and Site Configuration + if: success() + run: | mkdir -v content - git mv target/site/* content/ - git mv .asf.yaml.publish .asf.yaml - echo + git mv -v target/site/* content/ + git mv -v .asf.yaml.publish .asf.yaml - echo "Committing changes" - git commit -m "Auto-deploy site for commit ${{ steps.short-sha.outputs.SHORT_SHA }}" - echo - echo "Pushing site branch" + # Creates a single commit containing only the site build artifacts and site configuration files + # The commit is created with the author data set up in the previous step + # Force-pushes the created branch, overwriting the previously published site build + - name: Publish Results + if: success() + run: | + git commit -m "Auto-deploy site for commit ${{ steps.short-sha.outputs.SHORT_SHA }}" git push -f origin ${{ env.BRANCH_NAME }}