Skip to content

Commit

Permalink
screw cors
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 18, 2025
1 parent 6c1ffac commit 3e519ff
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ jobs:
--paths $(cat paths-to-invalidate.txt)

blog:
if: false
name: blog.pkgx.dev
runs-on: ubuntu-latest
defaults:
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/stars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ on:
schedule:
- cron: "17 */2 * * *"
workflow_dispatch:
push:
branches:
- main
paths:
- .github/workflows/stars.yml
pull_request:
paths:
- .github/workflows/stars.yml
Expand Down Expand Up @@ -44,12 +49,18 @@ jobs:
echo '${{ steps.fetch.outputs.result }}' > stars.json
aws s3 cp s3://www.pkgx.sh/stars.json ./remote
aws s3 cp s3://www.pkgx.dev/stars.json ./remote
if [ "$(cat ./stars.json)" != "$(cat ./remote)" ]; then
aws s3 cp ./stars.json s3://www.pkgx.sh/stars.json
aws cloudfront \
create-invalidation \
--distribution-id E8ZRC36XS5K65 \
--paths /stars.json
aws s3 cp ./stars.json s3://www.pkgx.dev/stars.json
aws cloudfront \
create-invalidation \
--distribution-id E15VQ3SI584CSG \
--paths /stars.json
fi
2 changes: 1 addition & 1 deletion src/components/Stars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function Stars({ href, hideCountIfMobile }: { href?: string, hide
const isxs = useMediaQuery(theme.breakpoints.down('md'));

const {value: stars} = useAsync(async () => {
const response = await fetch('https://pkgx.sh/stars.json');
const response = await fetch('/stars.json');
const data = await response.json();
return data
}, [])
Expand Down

0 comments on commit 3e519ff

Please sign in to comment.