Website Summary Files Commits Branches @commit @diff @stats
path: root / deploy.php
diff options
context:
space:
mode:
Commitb56844313df9a6e53cd6f0bd32c69aacf33e8971 (patch)
Author
 pgmatev <petargabriel.matev@gmail.com>
2020-07-10 14:05:04 +0300
Committer
 pgmatev <petargabriel.matev@gmail.com>
2020-07-10 14:05:04 +0300
Files12f0b1475f1e73971ce5771befe6d68b98d3fc2c /deploy.php
tues-interns-2020-b56844313df9a6e53cd6f0bd32c69aacf33e8971.tar
tues-interns-2020-b56844313df9a6e53cd6f0bd32c69aacf33e8971.tar.gz
tues-interns-2020-b56844313df9a6e53cd6f0bd32c69aacf33e8971.zip
Parent727f5f11ff636a1106332b1cf5eb30bf1062cc01 (diff)
Parente5d5d7e8c98713c824d61a93846a2724e6a80893 (diff)
Merge branch 'master' of https://github.com/DevriX/tues-interns-2020
1 files changed, 17 insertions, 0 deletions
-rw-r--r--deploy.php17
diff --git a/deploy.php b/deploy.php
new file mode 100644
index 0000000..49694c9
--- /dev/null
+++ b/deploy.php
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * Get the latest version of the master branch
+ */
+echo shell_exec( 'git fetch origin master; ');
+echo shell_exec( 'git checkout master; ');
+echo shell_exec( 'git pull origin master; ');
+echo shell_exec( 'wp cache flush ');
+
+// Load WordPress
+require_once( 'wp-load.php' );
+
+// Display a link to the homepage
+echo '<div>';
+echo 'You are ready to check the <a href="' . home_url( '/' ) . '">Homepage</a>';
+echo '</div>';