From 9c227c1f59bde37406e43ffb226330fa18a0cf8f Mon Sep 17 00:00:00 2001 From: Flaminel Date: Fri, 1 Aug 2025 17:58:08 +0300 Subject: [PATCH] add Cloudflare static assets --- .github/workflows/cloudflare-pages.yml | 36 +++++++++++++++++++ Cloudflare/_headers | 3 ++ .../static/known_malware_file_name_patterns | 2 ++ 3 files changed, 41 insertions(+) create mode 100644 .github/workflows/cloudflare-pages.yml create mode 100644 Cloudflare/_headers create mode 100644 Cloudflare/static/known_malware_file_name_patterns diff --git a/.github/workflows/cloudflare-pages.yml b/.github/workflows/cloudflare-pages.yml new file mode 100644 index 00000000..ae19c461 --- /dev/null +++ b/.github/workflows/cloudflare-pages.yml @@ -0,0 +1,36 @@ +name: Deploy to Cloudflare Pages + +on: + push: + branches: + - main + paths: + - 'Cloudflare/**' + - 'blacklist' + - 'blacklist_permissive' + - 'whitelist' + - 'whitelist_with_subtitles' + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + name: Deploy to Cloudflare Pages + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Copy root static files to Cloudflare static directory + run: | + cp blacklist Cloudflare/static/ + cp blacklist_permissive Cloudflare/static/ + cp whitelist Cloudflare/static/ + cp whitelist_with_subtitles Cloudflare/static/ + + - name: Deploy to Cloudflare Pages + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }} + workingDirectory: "Cloudflare" + command: pages deploy . --project-name=cleanuparr \ No newline at end of file diff --git a/Cloudflare/_headers b/Cloudflare/_headers new file mode 100644 index 00000000..5ef61f0a --- /dev/null +++ b/Cloudflare/_headers @@ -0,0 +1,3 @@ +# Cache static files for 5 minutes +/static/* + Cache-Control: public, max-age=300, s-maxage=300 \ No newline at end of file diff --git a/Cloudflare/static/known_malware_file_name_patterns b/Cloudflare/static/known_malware_file_name_patterns new file mode 100644 index 00000000..29e4ce0d --- /dev/null +++ b/Cloudflare/static/known_malware_file_name_patterns @@ -0,0 +1,2 @@ +thepirateheaven.org +RARBG.work \ No newline at end of file