Skip to content

Commit

Permalink
ci: 👷 ready to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
BeiyanYunyi committed Dec 27, 2024
1 parent c0c142a commit 8296a31
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
permissions:
contents: read
id-token: write
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -38,3 +39,12 @@ jobs:
name: result
path: |
result
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }}
command: pages deploy ./result --project-name=fonts
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions _headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/*
Access-Control-Allow-Origin: *
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
}:
let
index-html = ./index.html;
headers-file = ./_headers;
build-python = ./build.py;

source-han-serif-version = fonts-version.source-han-serif.version;
Expand Down Expand Up @@ -173,6 +174,7 @@
mkdir $out
install -Dm 644 ${index-html} $out/index.html
install -Dm 644 ${headers-file} $out/_headers
cp -r ./result/* $out
runHook postInstall
Expand Down

0 comments on commit 8296a31

Please sign in to comment.