]> Nishi Git Mirror - dataworks.git/commitdiff
separate actions
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Tue, 25 Jun 2024 01:03:20 +0000 (01:03 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Tue, 25 Jun 2024 01:03:20 +0000 (01:03 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@424 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

.github/workflows/build.yml
.github/workflows/deploy.yml [new file with mode: 0644]
Server/server.c

index 9983d7db21bfe64ed5b7f5434e1664ea1d8dc494..c4cbec8d564eff30802f2492593c53e9a5494ccc 100644 (file)
@@ -5,45 +5,8 @@ on:
   schedule:
   - cron: "0 */6 * * *"
 
-concurrency:
-  group: "pages"
-  cancel-in-progress: true
-
 jobs:
-  deploy-pages:
-
-    name: "Deploy pages"
-
-    runs-on: ubuntu-latest
-
-    environment:
-      name: github-pages
-      url: ${{ steps.deployment.outputs.page_url }}
-
-    permissions:
-      contents: write
-      pages: write
-      id-token: write
-
-    steps:
-    - name: Checkout
-      uses: actions/checkout@v4
-    - name: Install packages
-      run: sudo apt-get install zip byacc flex doxygen graphviz
-    - name: Make sure it is clean
-      run: make clean
-    - name: Make for Linux 64-bit
-      run: make YACC=byacc -j3
-    - name: Setup Pages
-      uses: actions/configure-pages@v4
-    - name: Upload pages
-      uses: actions/upload-pages-artifact@v3
-      with:
-        path: "Document/doc/html"
-    - name: Deploy
-      uses: actions/deploy-pages@v4
-
-  build-amiga:
+    build-amiga:
 
     name: "Build for Amiga"
 
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644 (file)
index 0000000..5e00280
--- /dev/null
@@ -0,0 +1,43 @@
+name: Deploy pages
+
+on:
+  workflow_dispatch:
+  push:
+
+concurrency:
+  group: "pages"
+  cancel-in-progress: true
+
+jobs:
+  deploy-pages:
+
+    name: "Deploy pages"
+
+    runs-on: ubuntu-latest
+
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
+    permissions:
+      contents: write
+      pages: write
+      id-token: write
+
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v4
+    - name: Install packages
+      run: sudo apt-get install zip byacc flex doxygen graphviz
+    - name: Make sure it is clean
+      run: make clean
+    - name: Make for Linux 64-bit
+      run: make YACC=byacc -j3
+    - name: Setup Pages
+      uses: actions/configure-pages@v4
+    - name: Upload pages
+      uses: actions/upload-pages-artifact@v3
+      with:
+        path: "Document/doc/html"
+    - name: Deploy
+      uses: actions/deploy-pages@v4
index a2501c541cae63decd38608c20ab3b2c1957f997..12e15cec803ab2510e715bf6748ced173b694978 100644 (file)
@@ -75,6 +75,8 @@ void writeline(int sock, const char* str);
 char* readline_sock(int sock);
 void disconnect(int sock);
 
+FILE* flog;
+
 void protocol_init(int sock) {
        /* sock is ignored on hayes */
        char* tmp;
@@ -202,7 +204,7 @@ void protocol_loop(int sock) {
                                                                if(strcmp(entries[j]->pass, buf + i + 1) == 0) {
                                                                        writeline(sock, "LOGIN");
                                                                        login = true;
-                                                                       printf("User %s is in\n", user);
+                                                                       fprintf(flog, "User %s is in\n", user);
                                                                        break;
                                                                } else {
                                                                        writeline(sock, "ERROR:INVALID_PASSWORD");
@@ -237,6 +239,7 @@ void protocol_loop(int sock) {
                }
                free(buf);
        }
+       if(user != NULL) fprintf(flog, "User %s disconnected\n", user);
 }
 
 void exitnow(int sig) {
@@ -247,8 +250,6 @@ void exitnow(int sig) {
 #endif
 }
 
-FILE* flog;
-
 int rescan(void) {
        if(entries != NULL) {
                fprintf(flog, "Rescan...\n");