Create cache-build.yml

This commit is contained in:
FURK4NGG
2025-03-05 00:50:17 +03:00
committed by GitHub
parent c2c2bf3cef
commit bc480656b8
+34
View File
@@ -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: ./