Create cache-build.yml
This commit is contained in:
@@ -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: ./
|
||||||
Reference in New Issue
Block a user