Skip to content

Commit

Permalink
Try Cloudflare Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
polyrabbit committed Oct 16, 2023
1 parent f513d4b commit 440a59f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/static.yml
Expand Up @@ -20,6 +20,7 @@ permissions:
contents: read
pages: write
id-token: write
deployments: write

# Allow one concurrent deployment
concurrency:
Expand Down Expand Up @@ -130,3 +131,13 @@ jobs:
id: deployment
uses: actions/deploy-pages@v2
if: ${{ success() }}

- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@1
if: ${{ success() }}
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: hndigest
directory: 'output'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion db/summary.py
Expand Up @@ -108,6 +108,7 @@ def expire():
Summary.model.not_in((Model.OPENAI.value, Model.TRANSFORMER.value, Model.LLAMA.value)))
result = session.execute(stmt)
cost = (time.time() - start) * 1000
logger.info(f'evicted {result.rowcount} content items, cost(ms): {cost:.2f}')
logger.info(f'evicted {result.rowcount} full content items, cost(ms): {cost:.2f}')

session.commit()
return deleted + result.rowcount

0 comments on commit 440a59f

Please sign in to comment.