diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml new file mode 100644 index 0000000..0972183 --- /dev/null +++ b/.forgejo/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: Deploy + +on: + push: + branches: + - main + +jobs: + deploy: + name: Deploy to Production + runs-on: docker + container: + image: forgejo-ci-php:latest + steps: + - name: Checkout code + run: | + git clone --depth 1 --branch main https://oauth2:${{ github.token }}@forge.studio-variable.com/${{ github.repository }}.git . + + - name: Deploy via FTP + env: + USERNAME: ${{ secrets.USERNAME }} + PASSWORD: ${{ secrets.PASSWORD }} + HOST: ${{ secrets.HOST }} + run: | + apt-get update -qq && apt-get install -y -qq lftp + cat > /tmp/lftp-script.txt < + + + + + + + + + + + + + + +
+
+
+

+ +
+
+
+

Regular supporters

+

0

+
+
+

Goal

+

500

+
+
+ +

+
+ +

+
+ +
+

+
+ +
+

+
+ +
+ + + + + +
    + +
  • + + + + + +

    +
  • + +
+ +
+ +
+

+ + +
+ + +
+ +
+
+ +
+
+ + +
+ + + + + +
+ +
+ + + + + +
+
+ +
+

+ +
+
+ +
+

+

+
+ +
+
+
+
+
+ +
+ + Donate + + + + + + +
+
+ + + + + + diff --git a/includes/cache.php b/includes/cache.php new file mode 100644 index 0000000..9514a4f --- /dev/null +++ b/includes/cache.php @@ -0,0 +1,42 @@ + [ + 'timeout' => 5, + 'header' => "Referer: https://soutenir.index.ngo\r\n", + ], + ]); + + $response = @file_get_contents($url, false, $context); + + if ($response !== false) { + $data = json_decode($response, true); + if ($data && !isset($data['error'])) { + @file_put_contents($cacheFile, $response, LOCK_EX); + return $data; + } + } + + // Fallback: serve stale cache rather than nothing + if (file_exists($cacheFile)) { + return json_decode(file_get_contents($cacheFile), true) ?: []; + } + + return []; +} diff --git a/includes/config.php b/includes/config.php new file mode 100644 index 0000000..5f4447f --- /dev/null +++ b/includes/config.php @@ -0,0 +1,6 @@ +
-

+

Pour continuer à enquêter,
Index a besoin de vous

-
+
-
+

Soutiens réguliers

0

-
+

Objectif

500

-

+

Objectif 500 Soutiens
au 21 juin 2026

-

+

Index est une ONG d’investigation
à but non-lucratif.
Vos dons garantissent notre indépendance.

-

+

Pourquoi soutenir Index  ?
Écoutez les premier·es concerné·es

@@ -133,8 +133,8 @@ >
- -