Skip to content

Commit 5fc065c

Browse files
authored
Merge pull request #114 from itk-dev/feature/drupal-site-update
Added more info on "Check that site can be updated" job"
2 parents 0f77b2f + be2fc5b commit 5fc065c

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

github/workflows/drupal/site.yaml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,28 @@ jobs:
6464
# Check updating site only on pull request.
6565
if: github.event_name == 'pull_request'
6666
name: Check that site can be updated
67+
68+
# This job checks that the Drupal site can be upgraded without issues.
69+
#
70+
# We do this by
71+
#
72+
# 1. Checking out the base branch ("github.base_ref") and installing the
73+
# site from scratch (using the exact same steps as the "install-site"
74+
# job)
75+
# 2. Checking out the updated code and updating the site from the previous
76+
# installation
77+
#
78+
# Notice that step 2 is NOT run with the code in our new branch, but with
79+
# the updated code merged on top of the target branch
80+
# (cf.https://github.com/actions/checkout/issues/881). This makes sure that
81+
# we can actually update the site after merging with the base branch.
82+
#
83+
# In some cases we run into a situation where the base site (step 1) cannot
84+
# be installed, e.g. if this is a new project or we're making changes that
85+
# require manual steps on the upgrade path, and then this jobs will fail. In
86+
# that case we should note this in the pull request description and document
87+
# the steps needed to complete the upgrade path.
88+
6789
runs-on: ubuntu-latest
6890
steps:
6991
# Install site from our base ref
@@ -101,17 +123,15 @@ jobs:
101123
sudo chown -Rv $USER:$USER vendor/ web/ private-files/ || true
102124
sudo chmod -Rv a+w web/sites/default || true
103125
104-
# Install site with our current ref
126+
# Update site using our updated code.
105127
- uses: actions/checkout@v4
106128
with:
107-
ref: ${{ github.head_ref }}
108129
# Keep our local settings (cf.
109130
# https://github.com/actions/checkout?tab=readme-ov-file#usage)
110131
clean: false
111132

112133
- name: Start docker and install dependencies
113134
run: |
114-
docker network create frontend || true
115135
docker compose pull
116136
docker compose up --detach
117137

0 commit comments

Comments
 (0)