Add cache purge to github action

This commit is contained in:
Nate Kelley 2025-09-10 11:32:11 -06:00
parent a77f11e247
commit 0d133eea0e
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
4 changed files with 7 additions and 5 deletions

View File

@ -94,6 +94,12 @@ jobs:
env:
NODE_ENV: production
- name: Purge Cloudflare Cache
uses: nathanvaughn/actions-cloudflare-purge@master
with:
cf_zone: ${{ secrets.CLOUDFLARE_ZONE_ID }}
cf_auth: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Get commit info
id: commit
run: |
@ -114,6 +120,7 @@ jobs:
echo "- **Commit:** \`${SHA}\`" >> $GITHUB_STEP_SUMMARY
echo "- **Full SHA:** \`${{ steps.commit.outputs.sha_full }}\`" >> $GITHUB_STEP_SUMMARY
echo "- **Triggered by:** ${{ github.actor }}" >> $GITHUB_STEP_SUMMARY
echo "- **Cache:** Purged ✅" >> $GITHUB_STEP_SUMMARY
echo "- **Time:** $(date -u +'%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_STEP_SUMMARY
- name: Handle deployment failure

View File

@ -15,7 +15,6 @@ export const Route = createFileRoute('/app')({
context: ({ context }) => ({ ...context, getAppLayout }),
ssr: true,
beforeLoad: async () => {
console.log('before load app');
const { isExpired, accessToken = '' } = await getSupabaseSession();
if (isExpired || !accessToken) {
@ -30,7 +29,6 @@ export const Route = createFileRoute('/app')({
loader: async ({ context }) => {
const { queryClient, accessToken } = context;
try {
console.log('loader app');
const [initialLayout, user] = await Promise.all([
getAppLayout({ id: PRIMARY_APP_LAYOUT_ID }),
getSupabaseUser(),
@ -39,7 +37,6 @@ export const Route = createFileRoute('/app')({
prefetchListDatasources(queryClient),
prefetchGetDatasets(queryClient),
]);
console.log('loader app done', user, initialLayout);
if (!user) {
throw redirect({ to: '/auth/login', replace: true });

View File

@ -2,7 +2,6 @@ import { createFileRoute, redirect } from '@tanstack/react-router';
export const Route = createFileRoute('/app/')({
beforeLoad: async () => {
console.log('before load redirecting to app home');
throw redirect({ to: '/app/home', replace: true });
},
component: () => null,

View File

@ -2,7 +2,6 @@ import { createFileRoute, redirect } from '@tanstack/react-router';
export const Route = createFileRoute('/')({
beforeLoad: async () => {
console.log('before load redirecting to app');
throw redirect({ to: '/app/home', replace: true });
},
component: () => null,