Skip to content

Commit

Permalink
chore(github): adds workflow token to cleanup job; uses context sha
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrebb committed Sep 26, 2023
1 parent a916135 commit 98953e6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/bdt-fe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
13 changes: 11 additions & 2 deletions front/src/lib/components/PageTransition.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 98953e6

Please sign in to comment.