Skip to content

Commit 496b4b0

Browse files
authored
Add the WP install steps
1 parent ef86a16 commit 496b4b0

File tree

1 file changed

+27
-15
lines changed

1 file changed

+27
-15
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,39 @@ jobs:
3636
run: |
3737
CONTAINER_ID=$(docker-compose -f .github/docker/docker-compose.yml ps -q wordpress)
3838
docker logs "$CONTAINER_ID"
39-
39+
4040
# Wait for WordPress to be fully up before running commands
4141
- name: Wait for WordPress to be available
4242
run: |
4343
# Give the container extra time to initialize
4444
echo "Initial wait for container initialization…"
4545
sleep 10
46-
for i in {1..30}; do
47-
echo "Iteration $i: Executing verbose curl"
48-
RESPONSE=$(curl -v --max-time 30 http://localhost:8000 || true)
49-
echo "Response from curl:"
50-
echo "$RESPONSE"
51-
if echo "$RESPONSE" | grep -q "WordPress"; then
52-
echo "WordPress is up"
53-
exit 0
54-
fi
55-
echo "Waiting for WordPress to be available..."
56-
sleep 10
57-
done
58-
echo "Timed out waiting for WordPress to start."
59-
exit 1
46+
#for i in {1..30}; do
47+
# echo "Iteration $i: Executing verbose curl"
48+
# RESPONSE=$(curl -v --max-time 30 http://localhost:8000 || true)
49+
# echo "Response from curl:"
50+
# echo "$RESPONSE"
51+
# if echo "$RESPONSE" | grep -q "WordPress"; then
52+
# echo "WordPress is up"
53+
# exit 0
54+
# fi
55+
# echo "Waiting for WordPress to be available..."
56+
# sleep 10
57+
#done
58+
#echo "Timed out waiting for WordPress to start."
59+
#exit 1
60+
61+
- name: Install WordPress via WP-CLI
62+
run: |
63+
# Run WordPress install
64+
docker exec $CONTAINER_ID wp core install \
65+
--url="http://localhost:8000" \
66+
--title="GitHub Actions Test Site" \
67+
--admin_user="admin" \
68+
--admin_password="admin_password" \
69+
--admin_email="admin@example.com" \
70+
--skip-email \
71+
--allow-root
6072
6173
# Copy plugin into container
6274
- name: Copy Plugin into Container

0 commit comments

Comments
 (0)