diff --git a/cache-build.yml b/cache-build.yml new file mode 100644 index 0000000..bcfeaf0 --- /dev/null +++ b/cache-build.yml @@ -0,0 +1,34 @@ +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: ./ + key: ${{ runner.os }}-build-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-build- + + - name: Generate Versioned Files + run: | + echo "Generating version map..." + echo "{ \"index.html\": \"v2\", \"home_en.html\": \"v1\", \"home_tr.html\": \"v1\" }" > version.json + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./ \ No newline at end of file