Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ jobs:
- name: Set up environment
run: |
APIURL="https://api.github.com/repos/mesh-adaptation"
echo "REPOS=${APIURL}/animate ${APIURL}/goalie ${APIURL}/movement ${APIURL}/UM2N" >> $GITHUB_ENV
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
echo "REPOS=${APIURL}/adapt_common ${APIURL}/animate ${APIURL}/goalie ${APIURL}/movement ${APIURL}/UM2N" >> ${GITHUB_ENV}
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> ${GITHUB_ENV}

- name: Check for updates in repositories
id: check_repos
run: |
for REPO in $REPOS; do
echo "Checking $REPO"
COMMITS=$(curl -L -H "Authorization: token $GITHUB_TOKEN" "$REPO/commits?sha=main&since=$(date -d '24 hours ago' +'%Y-%m-%dT%H:%M:%SZ')")
echo $COMMITS
for REPO in ${REPOS}; do
echo "Checking ${REPO}"
COMMITS=$(curl -L -H "Authorization: token ${GITHUB_TOKEN}" "$REPO/commits?sha=main&since=$(date -d '24 hours ago' +'%Y-%m-%dT%H:%M:%SZ')")
echo ${COMMITS}
if [ ${#COMMITS} -gt 10 ]; then
echo "Found new commits in $REPO"
echo "updates_found=true" >> $GITHUB_OUTPUT
echo "Found new commits in ${REPO}"
echo "updates_found=true" >> ${GITHUB_OUTPUT}
fi
done

Expand All @@ -66,18 +66,23 @@ jobs:
- name: Export PYTHONPATH
run: |
PYTHONVERSION=$(python3 -c "import sys; print('.'.join(sys.version.split('.')[:2]))")
echo "PYTHONPATH=/opt/firedrake:/root/animate:/root/goalie:/root/movement:/root/um2n:/root/.local/lib/python${PYTHONVERSION}/site-packages" >> $GITHUB_ENV
echo "PYTHONPATH=/opt/firedrake:/root/adapt_common:/root/animate:/root/goalie:/root/movement:/root/um2n:/root/.local/lib/python${PYTHONVERSION}/site-packages" >> ${GITHUB_ENV}

- uses: actions/checkout@v5
with:
persist-credentials: false

- name: Update Animate, Goalie, Movement, and UM2N
run: |
git config --global --add safe.directory '*'
for REPO in animate goalie movement UM2N; do
cd /root/${REPO}
git config --global --add safe.directory adapt_common
git config --global --add safe.directory animate
git config --global --add safe.directory goalie
git config --global --add safe.directory movement
git config --global --add safe.directory UM2N
for REPO in adapt_common animate goalie movement UM2N; do
cd "/root/${REPO}"
git pull
cd -
done
working-directory: /root/output/
shell: bash
Expand Down
Loading