From ccd42094a41ce5156ebe2f7f6878a289e704088b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Ara=C3=BAjo?= Date: Mon, 15 Jan 2024 11:31:04 -0300 Subject: [PATCH 1/6] Improved GitHub actions names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: George Araújo --- .github/workflows/deploy.yml | 2 +- .github/workflows/prettier.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9bae54864cc9..908e32e5047a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: deploy +name: Deploy site on: push: diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 8047676de02e..3749b4f1b507 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -1,4 +1,4 @@ -name: prettier +name: Prettier code formatter on: push: From 31db066554ee132220a6b6a1822a1074b9e2ba6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Ara=C3=BAjo?= Date: Mon, 15 Jan 2024 11:37:24 -0300 Subject: [PATCH 2/6] Added offline link checking before deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: George Araújo --- .github/workflows/deploy.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 908e32e5047a..42842bea6776 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,6 +41,12 @@ jobs: export JEKYLL_ENV=production bundle exec jekyll build --lsi purgecss -c purgecss.config.js + - name: Link Checker 🔗 + uses: lycheeverse/lychee-action@v1.9.0 + with: + fail: true + # only check local links + args: --offline --verbose --no-progress '_site/**/*.html' - name: Deploy 🚀 if: github.event_name != 'pull_request' uses: JamesIves/github-pages-deploy-action@v4 From 8ba20855cd3bfd1a926643b3f800cd53c9c51ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Ara=C3=BAjo?= Date: Mon, 15 Jan 2024 11:54:02 -0300 Subject: [PATCH 3/6] Remapping /al-folio/ to _site/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: George Araújo --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 42842bea6776..16344bf21dec 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -46,7 +46,7 @@ jobs: with: fail: true # only check local links - args: --offline --verbose --no-progress '_site/**/*.html' + args: --offline --remap "/al-folio/(.*) _site/$1" --verbose --no-progress '_site/**/*.html' - name: Deploy 🚀 if: github.event_name != 'pull_request' uses: JamesIves/github-pages-deploy-action@v4 From 8ec63f2e6d9fdb2950bfbf59b752a6ff10864ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Ara=C3=BAjo?= Date: Mon, 15 Jan 2024 11:56:14 -0300 Subject: [PATCH 4/6] Changed quotation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: George Araújo --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 16344bf21dec..57112ee6e1c4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -46,7 +46,7 @@ jobs: with: fail: true # only check local links - args: --offline --remap "/al-folio/(.*) _site/$1" --verbose --no-progress '_site/**/*.html' + args: --offline --remap '/al-folio/(.*) _site/$1' --verbose --no-progress '_site/**/*.html' - name: Deploy 🚀 if: github.event_name != 'pull_request' uses: JamesIves/github-pages-deploy-action@v4 From 0e562e8622e1eb55c0e5bcfd6caca573349ce86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Ara=C3=BAjo?= Date: Mon, 15 Jan 2024 14:12:45 -0300 Subject: [PATCH 5/6] Created different workflow to check for broken links on _site MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: George Araújo --- .github/workflows/broken-links-site.yml | 48 +++++++++++++++++++++++++ .github/workflows/deploy.yml | 6 ---- 2 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/broken-links-site.yml diff --git a/.github/workflows/broken-links-site.yml b/.github/workflows/broken-links-site.yml new file mode 100644 index 000000000000..aa2eb9601237 --- /dev/null +++ b/.github/workflows/broken-links-site.yml @@ -0,0 +1,48 @@ +name: Check for broken links on site + +on: + push: + branches: + - master + - main + pull_request: + branches: + - master + - main + workflow_dispatch: + +permissions: + contents: write + +jobs: + deploy: + # available images: https://github.com/actions/runner-images#available-images + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v3 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.2.2" + bundler-cache: true + - name: Update _config.yml ⚙️ + uses: fjogeleit/yaml-update-action@v0.13.1 + with: + commitChange: false + valueFile: "_config.yml" + changes: {"giscus.repo":"${{ github.repository }}","baseurl":""} + - name: Install and Build 🔧 + run: | + pip3 install --upgrade jupyter + npm install -g mermaid.cli + npm install -g purgecss + export JEKYLL_ENV=production + bundle exec jekyll build --lsi + purgecss -c purgecss.config.js + - name: Link Checker 🔗 + uses: lycheeverse/lychee-action@v1.9.0 + with: + fail: true + # only check local links + args: --offline --remap '_site(/?.*)/assets/(.*) _site/assets/$2' --verbose --no-progress '_site/**/*.html' \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 57112ee6e1c4..908e32e5047a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,12 +41,6 @@ jobs: export JEKYLL_ENV=production bundle exec jekyll build --lsi purgecss -c purgecss.config.js - - name: Link Checker 🔗 - uses: lycheeverse/lychee-action@v1.9.0 - with: - fail: true - # only check local links - args: --offline --remap '/al-folio/(.*) _site/$1' --verbose --no-progress '_site/**/*.html' - name: Deploy 🚀 if: github.event_name != 'pull_request' uses: JamesIves/github-pages-deploy-action@v4 From 5882b53bb48a14216922124f6a8740d6e6bee818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Ara=C3=BAjo?= Date: Mon, 15 Jan 2024 14:18:49 -0300 Subject: [PATCH 6/6] Updated broken-links-site action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: George Araújo --- .github/workflows/broken-links-site.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/broken-links-site.yml b/.github/workflows/broken-links-site.yml index aa2eb9601237..4ed26246170c 100644 --- a/.github/workflows/broken-links-site.yml +++ b/.github/workflows/broken-links-site.yml @@ -31,7 +31,11 @@ jobs: with: commitChange: false valueFile: "_config.yml" - changes: {"giscus.repo":"${{ github.repository }}","baseurl":""} + changes: | + { + "giscus.repo": "${{ github.repository }}", + "baseurl": "" + } - name: Install and Build 🔧 run: | pip3 install --upgrade jupyter @@ -45,4 +49,4 @@ jobs: with: fail: true # only check local links - args: --offline --remap '_site(/?.*)/assets/(.*) _site/assets/$2' --verbose --no-progress '_site/**/*.html' \ No newline at end of file + args: --offline --remap '_site(/?.*)/assets/(.*) _site/assets/$2' --verbose --no-progress '_site/**/*.html'