Repository: alexisthual/fugw (language: python)

Issue:
Upgrade deprecated gh actions
These github actions trigger a deprecation warning and need to be updated:

- actions/checkout@v2
- actions/setup-python@v2
- actions/upload-artifact@v2


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/deploy_site.yml b/.github/workflows/deploy_site.yml
index a5c8a12..107474e 100644
--- a/.github/workflows/deploy_site.yml
+++ b/.github/workflows/deploy_site.yml
@@ -12,7 +12,7 @@ jobs:
   build_docs:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
       - name: Generate HTML docs
         uses: ammaraskar/sphinx-action@master
         with:
@@ -23,7 +23,7 @@ jobs:
             pip install torch --index-url https://download.pytorch.org/whl/cpu
             pip install -e ".[doc]"
       - name: Upload generated HTML as artifact
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v4
         with:
           name: DocHTML
           path: doc/_build/html/
@@ -33,9 +33,9 @@ jobs:
     needs: build_docs
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
       - name: Download artifacts
-        uses: actions/download-artifact@v2
+        uses: actions/download-artifact@v4
         with:
           name: DocHTML
           path: doc/_build/html/
@@ -50,7 +50,7 @@ jobs:
           git add .
           git commit -m "Update documentation" -a || true
       - name: Push changes
-        uses: ad-m/github-push-action@v0.6.0
+        uses: ad-m/github-push-action@v0.8.0
         with:
           branch: gh-pages
           directory: gh-pages


Test patch:
diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml
index 48ef4be..cadde1b 100644
--- a/.github/workflows/unit_tests.yml
+++ b/.github/workflows/unit_tests.yml
@@ -26,9 +26,9 @@ jobs:
           - os: macos-latest
             version_python: "3.10"
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
       - name: Set up Python
-        uses: actions/setup-python@v2
+        uses: actions/setup-python@v5
         with:
           python-version: ${{ matrix.version_python }}
       - name: Install dependencies