diff --git a/.github/workflows/bdt-fe.yml b/.github/workflows/bdt-fe.yml index 53ed9708e..d7a33db59 100644 --- a/.github/workflows/bdt-fe.yml +++ b/.github/workflows/bdt-fe.yml @@ -87,15 +87,14 @@ jobs: steps: - name: Delete Previous deployments uses: actions/github-script@v6 - env: - GITHUB_SHA_HEAD: ${{ github.event.pull_request.head.sha }} with: + github-token: ${{ secrets.GH_WORKFLOW_TOKEN }} script: | const { GITHUB_SHA_HEAD } = process.env const deployments = await github.rest.repos.listDeployments({ owner: context.repo.owner, repo: context.repo.repo, - sha: GITHUB_SHA_HEAD + sha: context.sha }); await Promise.all( deployments.data.map(async (deployment) => { diff --git a/front/src/lib/components/PageTransition.svelte b/front/src/lib/components/PageTransition.svelte index 9ef23277a..1466fe2dc 100644 --- a/front/src/lib/components/PageTransition.svelte +++ b/front/src/lib/components/PageTransition.svelte @@ -5,13 +5,18 @@ export let transitionKey; let to; + function motionless() { + return window.matchMedia('(prefers-reduced-motion: reduce)').matches; + } + function doIt() { return { - duration: 500, + duration: motionless() === true ? 0 : 500, }; } async function animateOutroStart() { + if (motionless() === true) return false; const header = document.querySelector('.header'); to = $navigating?.to.route.id; document.body.classList.toggle('animating', true); @@ -21,13 +26,17 @@ } function animateOutroEnd() { + if (motionless() === true) return false; if (to === '/') return; scrollTop(); } - function animateIntroStart() {} + function animateIntroStart() { + if (motionless() === true) return false; + } function animateIntroEnd() { + if (motionless() === true) return false; setTimeout(() => { header.classList.toggle('scroll-transition', false); document.body.classList.toggle('animating', false);