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