Files
org_web/push.c
gitea-actions 65885dbb3a
All checks were successful
Build Org Website / build (push) Successful in 38s
updates
2026-08-20 11:32:08 +01:00

30 lines
653 B
C
Executable File

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char path[100] = "/home/zaine/master-folder/org-platform/org_web";
char command[200];
snprintf(command, sizeof(command), "cd %s && git add .", path);
int result = system(command);
snprintf(command, sizeof(command), "cd %s && git commit -m \"Auto commit", path);
result = system(command);
snprintf(command, sizeof(command), "cd %s && git push", path);
result = system(command);
if (result == 0) {
printf("Successfully pushed files to git.\n");
} else {
printf("Failed to push files to git.\n");
}
return 0;
}