From ca1572a2ebdd2887703a1a2ffcf037d8030cc773 Mon Sep 17 00:00:00 2001 From: xEsiah Date: Tue, 20 Oct 2026 13:13:14 +0200 Subject: [PATCH] Update deploy workflow for CoHaiSe --- .github/workflows/deploy.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..5fcf0c3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: Deploy React Site + +on: + push: + branches: + - main + +jobs: + build-and-deploy: + runs-on: esiah-s-universe + + steps: + - uses: actions/checkout@v4 + + - name: Fetch Git LFS objects + run: | + git lfs install --local + AUTH="$(git config --local "http.${{ github.server_url }}/.extraheader")" + git config --local --unset "http.${{ github.server_url }}/.extraheader" + git config --local "http.${{ github.server_url }}/${{ github.repository }}.git/info/lfs/objects/batch.extraheader" "$AUTH" + git lfs pull + + - uses: actions/setup-node@v4 + with: + node-version: "20" + + - run: npm ci + + - run: npm run build + + - name: Verify no LFS pointer files remain + run: | + if grep -rl "git-lfs.github.com/spec/v1" dist/; then + echo "::error::LFS pointers found in dist/ - git-lfs was not fetched." + exit 1 + fi + + - run: rsync -av --delete dist/ /srv/apps/websites/esiah.dev/