4848 if : github.ref != 'refs/heads/master'
4949 container : quay.io/hypernode/deploy:3-php8.1-node18
5050 steps :
51- - uses : actions/checkout@v2
51+ - uses : actions/checkout@v3
52+ with :
53+ fetch-depth : 0
5254 - name : download build artifact
5355 uses : actions/download-artifact@v3
5456 with :
@@ -65,11 +67,31 @@ jobs:
6567 - name : Get brancher hostname
6668 id : get_brancher_hostname
6769 run : echo "BRANCHER_URL=https://$(jq .hostnames[0] deployment-report.json -r)" >> $GITHUB_OUTPUT
70+ - name : Get changed pages
71+ id : changed_pages
72+ run : |
73+ git config --global --add safe.directory $(pwd)
74+ commits=${{ github.event.pull_request.commits }}
75+ if [[ -n "$commits" ]]; then
76+ # Prepare enough depth for diffs with target branch
77+ git fetch --depth="$(( commits + 1 ))"
78+ fi
79+ result="$(python3 ci/bin/get_changed_urls.py \
80+ ${{ github.event.pull_request.base.sha }} \
81+ ${{github.event.pull_request.head.sha}} \
82+ --base-url=${{ steps.get_brancher_hostname.outputs.BRANCHER_URL }}
83+ )"
84+ echo "$result"
85+ echo "CHANGED_PAGES<<EOF" >> $GITHUB_OUTPUT
86+ echo "$result" >> $GITHUB_OUTPUT
87+ echo "EOF" >> $GITHUB_OUTPUT
88+ shell : bash
6889 - name : Comment hostname on PR
6990 uses : thollander/actions-comment-pull-request@v1
7091 with :
7192 message : |
72- Acceptance server is available at ${{ steps.get_brancher_hostname.outputs.BRANCHER_URL }}
93+ Acceptance server is available at ${{ steps.get_brancher_hostname.outputs.BRANCHER_URL }}.
94+ ${{ steps.changed_pages.outputs.CHANGED_PAGES }}
7395
7496 deploy_production :
7597 needs : build
81103 if : github.ref == 'refs/heads/master'
82104 container : quay.io/hypernode/deploy:3-php8.1-node18
83105 steps :
84- - uses : actions/checkout@v2
106+ - uses : actions/checkout@v3
85107 - name : download build artifact
86108 uses : actions/download-artifact@v3
87109 with :
0 commit comments