Repository: WISDEM/ORBIT (language: python)

Issue:
Workflow versions are out of date
Under each of the github workflow files: `gh_pages.yml`, `publish-to-pypi.yaml`, and `tests.yml` all refer to @v2 for *checkout* and *setup-python*.  They versions should be updated to v4 to avoid workflow complications for different users. 


Updated workflow versions, #141
Address #141 by updating the versions in the github workflow files. Also updated the rev field for psf/black in the pre-commit configuration file. 




Discussion / hints:
Will use this issue branch as an opportunity to update psf/black in the pre-commit file. When running the pre-commit step the following warning shows up: 

[WARNING] The 'rev' field of repo 'https://github.com/psf/black' appears to be a mutable reference (moving tag / branch).  Mutable references are never updated after first install and are not supported.  See https://pre-commit.com/#using-the-latest-version-for-a-repository for more details.

The rev field is set to 'stable' rather than a fixed version. 


Fix patch:
diff --git a/.github/workflows/gh_pages.yml b/.github/workflows/gh_pages.yml
index 96e087f6..cd0f8c1f 100644
--- a/.github/workflows/gh_pages.yml
+++ b/.github/workflows/gh_pages.yml
@@ -8,9 +8,9 @@ jobs:
   make-pages:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
       - name: select python version
-        uses: actions/setup-python@v2
+        uses: actions/setup-python@v4
         with:
           python-version: '3.8'
       - name: install dependencies
diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml
index ee92f5f4..30b1b9e2 100644
--- a/.github/workflows/publish-to-pypi.yml
+++ b/.github/workflows/publish-to-pypi.yml
@@ -6,9 +6,9 @@ jobs:
   deploy:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v2
+    - uses: actions/checkout@v4
     - name: Set up Python 3.7
-      uses: actions/setup-python@v2
+      uses: actions/setup-python@v4
       with:
         python-version: 3.7
     - name: Install dependencies
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 84ca9757..d103462c 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,7 +10,7 @@ repos:
           stages: [commit]
 
 -   repo: https://github.com/psf/black
-    rev: stable
+    rev: 22.3.0
     hooks:
         - id: black
           name: black


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index bf1b9868..f29cdfb6 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -15,12 +15,9 @@ jobs:
         python-version: [3.7, 3.8]
 
     steps:
-    - uses: actions/checkout@v2
-      with:
-        ref: ${{ github.event.pull_request.head.ref }}
-        fetch-depth: 1
+    - uses: actions/checkout@v4
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v2
+      uses: actions/setup-python@v4
       with:
         python-version: ${{ matrix.python-version }}
     - name: Install dependencies