From 25b91359b584558e317fbf5676fde0af64fa1aca Mon Sep 17 00:00:00 2001 From: Alexander Bandukwala <7h3kk1d@gmail.com> Date: Tue, 20 Aug 2024 15:43:42 -0400 Subject: [PATCH] Test partial clone for github workflow --- .github/workflows/deploy_branches.yml | 53 +++++++++++++++------------ 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/.github/workflows/deploy_branches.yml b/.github/workflows/deploy_branches.yml index cfc7dcecf8..c79e94df58 100644 --- a/.github/workflows/deploy_branches.yml +++ b/.github/workflows/deploy_branches.yml @@ -45,37 +45,42 @@ jobs: opam exec -- dune build @src/fmt --auto-promote src --profile release working-directory: ./source - name: Checkout the website build artifacts repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: hazelgrove/build token: ${{ secrets.ACCESS_TOKEN }} path: server + sparse-checkout: | + ${BRANCH_NAME} - name: Clear any old build of this branch run: if [ -d "${BRANCH_NAME}" ] ; then rm -rf "${BRANCH_NAME}" ; fi working-directory: ./server - name: Copy in the newly built source run: mkdir "./server/${BRANCH_NAME}" && cp -r "./source/_build/default/src/haz3lweb/www"/* "./server/${BRANCH_NAME}" - - name : Commit to the website aka deploy - run: | - git config user.name github-deploy-action - git config user.email hazel-deploy@hazel.org - git add -A - git pull --no-edit - git status - git diff-index --quiet HEAD || (git commit -m "github-deploy-action-${BRANCH_NAME}"; git push) + - name: See the status of the git repo + run: git status working-directory: ./server - - name: Run Tests - id: test - run: | - eval $(opam env) - make test - working-directory: ./source - - name: Test Report - uses: dorny/test-reporter@v1 - with: - name: Test Report - path: junit_tests*.xml - reporter: java-junit - fail-on-error: true - fail-on-empty: true # Use an empty test report to detect when something failed with the test runner - working-directory: ./source \ No newline at end of file + # - name : Commit to the website aka deploy + # run: | + # git config user.name github-deploy-action + # git config user.email hazel-deploy@hazel.org + # git add -A + # git pull --no-edit + # git status + # git diff-index --quiet HEAD || (git commit -m "github-deploy-action-${BRANCH_NAME}"; git push) + # working-directory: ./server + # - name: Run Tests + # id: test + # run: | + # eval $(opam env) + # make test + # working-directory: ./source + # - name: Test Report + # uses: dorny/test-reporter@v1 + # with: + # name: Test Report + # path: junit_tests*.xml + # reporter: java-junit + # fail-on-error: true + # fail-on-empty: true # Use an empty test report to detect when something failed with the test runner + # working-directory: ./source \ No newline at end of file