From 8a4f4a2f59e90552c02b7f4cf6bb2435d94a63d7 Mon Sep 17 00:00:00 2001 From: FURK4NGG <105324908+FURK4NGG@users.noreply.github.com> Date: Wed, 5 Mar 2025 01:07:52 +0300 Subject: [PATCH] Update cache-build.yml --- .github/workflows/cache-build.yml | 84 +++++++++++++------------------ 1 file changed, 36 insertions(+), 48 deletions(-) diff --git a/.github/workflows/cache-build.yml b/.github/workflows/cache-build.yml index 8508048..01e8baf 100644 --- a/.github/workflows/cache-build.yml +++ b/.github/workflows/cache-build.yml @@ -1,48 +1,36 @@ -name: GitHub Pages Cache Build - -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Cache Build Output - id: cache-build - uses: actions/cache@v4 - with: - path: public - key: ${{ runner.os }}-build-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-build- - - - name: Generate Version Map Automatically - run: | - echo "Generating version map..." - # Versiyon dosyası oluşturulacak - version_map="{}" - - # Versiyonları dosya dosya hesaplayalım ve ekleyelim - for file in $(find . -type f); do - if [[ $file != *"node_modules"* && $file != *".github"* ]]; then - # Dosya için hash hesapla - hash=$(sha256sum "$file" | awk '{print $1}') - # version.json'a yeni hash değeri ekleyelim - version_map=$(echo $version_map | jq --arg file "$file" --arg hash "$hash" '. + {($file): $hash}') - fi - done - - # Dosyayı yaz - echo $version_map > public/version.json - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public +- name: Update version.json + run: | + echo '{ + "index.html": "v1", + "home_en.html": "v2", + "home_tr.html": "v1", + "404.html": "v1", + "CSS/unpkg.comswiper@8swiper-bundle.min.css": "v1", + "FONTS/Inconsolata.woff2": "v1", + "FONTS/Jaro.woff2": "v1", + "FONTS/Monomakh.woff2": "v1", + "FONTS/Montserrat.woff2": "v1", + "FONTS/TacOne.woff2": "v1", + "FONTS/Teko.woff2": "v1", + "JAVASCRIPT/1.js": "v3", + "JAVASCRIPT/tr/1.js": "v1", + "JAVASCRIPT/darkmode-js.min.js": "v1", + "JAVASCRIPT/gsap.min.js": "v1", + "JAVASCRIPT/swiper-bundle.min.js": "v1", + "img/profile_photo1.webp": "v1", + "img/character1.webp": "v2", + "img/character2.webp": "v1", + "img/character3.webp": "v1", + "img/ai.webp": "v1", + "img/app.webp": "v1", + "img/cyber.webp": "v1", + "img/game.webp": "v1", + "img/robotic.webp": "v1", + "img/web.webp": "v1", + "img/up.webp": "v1", + "img/icon.ico": "v1", + "sitemap.xml": "v1", + "manifest.json": "v1", + "robots.txt": "v1", + ".htaccess.txt": "v1" + }' > public/version.json