From 5bc406161dd60a5ce001c3e6d091471005791204 Mon Sep 17 00:00:00 2001 From: ctmbl Date: Tue, 21 May 2024 13:25:25 +0200 Subject: [PATCH 1/4] Update checkout, download-artifact and upload-artifact Actions version to use Node.js 2 --- .github/workflows/build_and_deploy.yml | 8 ++++---- .github/workflows/deploy_dev.yml | 2 +- .github/workflows/pytest.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index e0a6f06..5f99018 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -27,7 +27,7 @@ jobs: # Checkout repo AND ITS SUBMODULES - name: 🛒 Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive @@ -38,7 +38,7 @@ jobs: # Upload build artifacts for deployment or download - name: 🚀 Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: prod-build path: ./build/blog/prod @@ -67,7 +67,7 @@ jobs: run: | mkdir -p build/blog/prod - name: 📥 Download build Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: prod-build path: build/blog/prod @@ -103,7 +103,7 @@ jobs: steps: # Checkout repo, no need to checkout submodule - name: 🛒 Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Get the list of added, changed, removed, and renamed files - name: 📑 Get changed files diff --git a/.github/workflows/deploy_dev.yml b/.github/workflows/deploy_dev.yml index 669e3d3..ebf4b48 100644 --- a/.github/workflows/deploy_dev.yml +++ b/.github/workflows/deploy_dev.yml @@ -17,7 +17,7 @@ jobs: steps: # Checkout repo AND ITS SUBMODULES - name: 🛒 Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 43a6132..59c5963 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -19,7 +19,7 @@ jobs: steps: # Checkout repo - name: 🛒 Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Install pytest - name: 🛠️ Install pytest From 49fed3f48b9e32f5fe3dcac0a7b0b69d0d21e488 Mon Sep 17 00:00:00 2001 From: ctmbl Date: Tue, 21 May 2024 13:37:04 +0200 Subject: [PATCH 2/4] Change get-changed-files action to retrieve-changed-files a maintained fork --- .github/workflows/build_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 5f99018..e5fa1e5 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -107,7 +107,7 @@ jobs: # Get the list of added, changed, removed, and renamed files - name: 📑 Get changed files - uses: jitterbit/get-changed-files@v1 + uses: masesgroup/retrieve-changed-files@v3 id: files with: format: space-delimited From d1dba92851fb8a7385ee4ca7913ee36fcdaa766b Mon Sep 17 00:00:00 2001 From: ctmbl Date: Mon, 17 Jun 2024 22:11:44 +0200 Subject: [PATCH 3/4] TO REVERT: test workflows version update --- .github/workflows/build_and_deploy.yml | 16 ++++++++-------- TO_DELETE | 0 2 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 TO_DELETE diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index e5fa1e5..609331f 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -60,7 +60,7 @@ jobs: # If for any reason you want to trigger this step on your fork remove the following line, # trigger manually or open an issue https://github.com/iScsc/blog.iscsc.fr/issues, # we'll find a better way to skip this step. - if: ${{ (github.event_name == 'push' && ! github.event.repository.fork) || github.event_name == 'workflow_dispatch' }} + # if: ${{ (github.event_name == 'push' && ! github.event.repository.fork) || github.event_name == 'workflow_dispatch' }} runs-on: ubuntu-latest steps: - name: 🛠️ Setup build directory @@ -88,7 +88,7 @@ jobs: # Upload the build to the remote server location: the volume shared by the nginx container serving http requests - name: 🚀 Upload run: | - rsync --archive --stats --verbose --delete ./build/blog/prod/* ${{ secrets.CI_USER_NAME }}@iscsc.fr:${{ secrets.REPO_PATH_ON_REMOTE }}/build/blog/prod + ls -l ./build/blog/prod - name: ⏬ Remote git pull run: | @@ -97,8 +97,8 @@ jobs: # Finally notify of the new article (if any) on the iScsc discord server # action jitterbit/get-changed-files@v1 doesn't support 'workflow_dispatch' events: https://github.com/jitterbit/get-changed-files/issues/38 notify: - needs: [deploy] - if: ${{ github.event_name != 'workflow_dispatch' }} + # needs: [deploy] + # if: ${{ github.event_name != 'workflow_dispatch' }} runs-on: ubuntu-latest steps: # Checkout repo, no need to checkout submodule @@ -125,7 +125,7 @@ jobs: echo "${{ steps.files.outputs.modified }}" echo "Added+Modified:" echo "${{ steps.files.outputs.added_modified }}" - - name: 📨 Notify on Discord - run: | - python3 -m pip install requests PyYAML - python3 ./scripts/new_article.py ${{ steps.files.outputs.added }} + # - name: 📨 Notify on Discord + # run: | + # python3 -m pip install requests PyYAML + # python3 ./scripts/new_article.py ${{ steps.files.outputs.added }} diff --git a/TO_DELETE b/TO_DELETE new file mode 100644 index 0000000..e69de29 From 23dbdd11edd2887783290260e71304aebde65a8f Mon Sep 17 00:00:00 2001 From: ctmbl Date: Mon, 17 Jun 2024 22:14:57 +0200 Subject: [PATCH 4/4] Revert "TO REVERT: test workflows version update" This reverts commit d1dba92851fb8a7385ee4ca7913ee36fcdaa766b. --- .github/workflows/build_and_deploy.yml | 16 ++++++++-------- TO_DELETE | 0 2 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 TO_DELETE diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 609331f..e5fa1e5 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -60,7 +60,7 @@ jobs: # If for any reason you want to trigger this step on your fork remove the following line, # trigger manually or open an issue https://github.com/iScsc/blog.iscsc.fr/issues, # we'll find a better way to skip this step. - # if: ${{ (github.event_name == 'push' && ! github.event.repository.fork) || github.event_name == 'workflow_dispatch' }} + if: ${{ (github.event_name == 'push' && ! github.event.repository.fork) || github.event_name == 'workflow_dispatch' }} runs-on: ubuntu-latest steps: - name: 🛠️ Setup build directory @@ -88,7 +88,7 @@ jobs: # Upload the build to the remote server location: the volume shared by the nginx container serving http requests - name: 🚀 Upload run: | - ls -l ./build/blog/prod + rsync --archive --stats --verbose --delete ./build/blog/prod/* ${{ secrets.CI_USER_NAME }}@iscsc.fr:${{ secrets.REPO_PATH_ON_REMOTE }}/build/blog/prod - name: ⏬ Remote git pull run: | @@ -97,8 +97,8 @@ jobs: # Finally notify of the new article (if any) on the iScsc discord server # action jitterbit/get-changed-files@v1 doesn't support 'workflow_dispatch' events: https://github.com/jitterbit/get-changed-files/issues/38 notify: - # needs: [deploy] - # if: ${{ github.event_name != 'workflow_dispatch' }} + needs: [deploy] + if: ${{ github.event_name != 'workflow_dispatch' }} runs-on: ubuntu-latest steps: # Checkout repo, no need to checkout submodule @@ -125,7 +125,7 @@ jobs: echo "${{ steps.files.outputs.modified }}" echo "Added+Modified:" echo "${{ steps.files.outputs.added_modified }}" - # - name: 📨 Notify on Discord - # run: | - # python3 -m pip install requests PyYAML - # python3 ./scripts/new_article.py ${{ steps.files.outputs.added }} + - name: 📨 Notify on Discord + run: | + python3 -m pip install requests PyYAML + python3 ./scripts/new_article.py ${{ steps.files.outputs.added }} diff --git a/TO_DELETE b/TO_DELETE deleted file mode 100644 index e69de29..0000000