Skip to content

Commit

Permalink
Merge branch 'espressif:main' into workshop/flowcode
Browse files Browse the repository at this point in the history
  • Loading branch information
georgik authored Dec 17, 2024
2 parents 5666baa + 71c76cd commit 96b62fc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/pr-check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
branches: [main]

env:
TARGET_REPO_URL: https://github.com/espressif/developer-portal.git
TARGET_BRANCH: main

jobs:
check-links:
runs-on: ubuntu-latest
Expand All @@ -18,21 +22,25 @@ jobs:
- name: Set environment variables
id: set-env
run: |
# Add target remote and fetch its branches
git remote add target ${{ env.TARGET_REPO_URL }}
git fetch target ${{ env.TARGET_BRANCH }}
# Extract the base commit ID where the feature branch diverged from main
base_commit=$(git merge-base origin/main ${{ github.event.pull_request.head.ref }})
echo "base_commit=$base_commit" >> $GITHUB_ENV
base_commit=$(git merge-base target/${{ env.TARGET_BRANCH }} ${{ github.event.pull_request.head.ref }})
echo "BASE_COMMIT=$base_commit" | tee -a $GITHUB_ENV
# Extract the head commit ID on the feature branch
head_commit=${{ github.event.pull_request.head.sha }}
echo "head_commit=$head_commit" >> $GITHUB_ENV
echo "HEAD_COMMIT=$head_commit" | tee -a $GITHUB_ENV
- name: Create baseline branch by reverting feature branch changes
run: |
# Create a copy of the feature branch
git checkout -b feature-baseline
# Reset the new branch to the base commit
git reset --hard ${{ env.base_commit }}
git reset --hard ${{ env.BASE_COMMIT }}
- name: Dump all links from feature-baseline
uses: lycheeverse/[email protected]
Expand All @@ -51,14 +59,11 @@ jobs:
- name: Append links-baseline.txt to .lycheeignore
run: cat links-baseline.txt >> .lycheeignore

- name: Print .lycheeignore
run: cat .lycheeignore

- name: Dump names of files altered in PR and append hash sign to find links with anchors
run: |
git diff --name-only --diff-filter=DM ${{ env.base_commit }} ${{ env.head_commit }} > altered-files.txt
git diff --name-only --diff-filter=DM ${{ env.BASE_COMMIT }} ${{ env.HEAD_COMMIT }} > altered-files.txt
sed -i 's|$|#|' altered-files.txt
git diff --name-status --diff-filter=R ${{ env.base_commit }} ${{ env.head_commit }} | awk '{print $2}' > renamed-files.txt
git diff --name-status --diff-filter=R ${{ env.BASE_COMMIT }} ${{ env.HEAD_COMMIT }} | awk '{print $2}' > renamed-files.txt
sed -i 's|$|#|' renamed-files.txt
- name: Print altered-files.txt
Expand Down
5 changes: 4 additions & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
{{ $jsRTL := resources.Get "js/rtl.js" }}
{{ $assets.Add "js" (slice $jsRTL) }}
{{ end }}
{{ $jsMobileMenu := resources.Get "js/mobilemenu.js" }}
{{ $assets.Add "js" (slice $jsMobileMenu) }}
{{ if $assets.Get "js" }}
{{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint
"sha512" }}
Expand All @@ -76,7 +78,8 @@
}}"></script>
{{ end }}
{{ if not .Site.Params.disableImageZoom | default true }}
<script src="{{ "js/zoom.min.js" | relURL }}"></script>
{{ $zoomJS := resources.Get "lib/zoom/zoom.min.js" | resources.Fingerprint "sha512" }}
<script src="{{ $zoomJS.RelPermalink }}" integrity="{{ $zoomJS.Data.Integrity }}"></script>
{{ end }}
{{/* Icons */}}
{{ if templates.Exists "partials/favicons.html" }}
Expand Down
5 changes: 2 additions & 3 deletions layouts/partials/header/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@
</div>
<div class="-my-2 -mr-2 md:hidden">

<label id="menu-button" for="menu-controller" class="block">
<input type="checkbox" id="menu-controller" class="hidden" />
<label id="menu-button" class="block">
{{ if .Site.Menus.main }}
<div class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400">
{{ partial "icon.html" "bars" }}
Expand All @@ -102,7 +101,7 @@
<ul
class="flex space-y-2 mt-3 flex-col items-end w-full px-6 py-6 mx-auto overflow-visible list-none ltr:text-right rtl:text-left max-w-7xl menu-ul">

<li>
<li id="menu-close-button">
<span
class="cursor-pointer inline-block align-text-bottom hover:text-primary-600 dark:hover:text-primary-400 menu-close">{{
partial
Expand Down

0 comments on commit 96b62fc

Please sign in to comment.