From 7666cc6971538239ba3cfd51e6a959aa3eda20f2 Mon Sep 17 00:00:00 2001 From: Julian Schambeck Date: Wed, 24 Jun 2026 14:23:16 +0200 Subject: [PATCH] rely on actions/deploy-pages in deploy job to do without paasapcom user No need anymore for paasapcom added as an outside collaborator or protecting any github pages branch because there is no branch anymore. --- .github/workflows/deploy-manual.yml | 67 +++++------------------------ 1 file changed, 11 insertions(+), 56 deletions(-) diff --git a/.github/workflows/deploy-manual.yml b/.github/workflows/deploy-manual.yml index d5e326d5ff..a9165d535c 100644 --- a/.github/workflows/deploy-manual.yml +++ b/.github/workflows/deploy-manual.yml @@ -23,11 +23,13 @@ jobs: VALIDATOR_OAUTH_CLIENT_ID: ${{ secrets.VALIDATOR_OAUTH_CLIENT_ID }} VALIDATOR_OAUTH_CLIENT_SECRET: ${{ secrets.VALIDATOR_OAUTH_CLIENT_SECRET }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: + # fetch complete history for step "export drawios" to safely determine + # date of last update to drawio files via git log fetch-depth: 0 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: node-version: '24' cache: npm @@ -76,7 +78,7 @@ jobs: run: node src/_scripts/_update-drawio-links.js - name: Upload Build Artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v5 with: path: build @@ -84,58 +86,11 @@ jobs: name: Deploy Site runs-on: ubuntu-latest needs: build - environment: github-pages + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} if: success() steps: - - name: Checkout Repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.PAASAPCOM_PAT }} - - - name: Download Build Artifact - uses: actions/download-artifact@v4 - with: - path: __build__ - - - name: Set up Git - run: | - git config --global user.email "paa@sap.com" - git config --global user.name "paasapcom" - - - name: Switch to Pages Branch - run: | - gh_pages_branch=$(gh api "repos/$GITHUB_REPOSITORY/pages" --jq '.source.branch') - git fetch origin $gh_pages_branch - git checkout $gh_pages_branch - echo "gh_pages_branch=$gh_pages_branch" >> "$GITHUB_ENV" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Drop Previous Content - run: | - shopt -s extglob - rm -rf !(@*|__build__) - - - name: Extract Build Content - run: | - if [[ -d "__build__" && "$(ls -A __build__)" ]]; then - mv __build__/* ./ - tar -xvf github-pages/artifact.tar - rm github-pages/artifact.tar - rm -rf __build__ - else - echo "No build files found. Skipping move step." - fi - - - name: Commit and Push Changes - env: - GITHUB_TOKEN: ${{ secrets.PAASAPCOM_PAT }} - # prevent history build-up and .git bloat with orphan - run: | - git checkout --orphan site-anew - git add -A - if [[ "$(git status -s)" ]]; then - git commit -m "site build ➝ gh pages" - git push -f origin HEAD:${{ env.gh_pages_branch }} - fi + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5