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 4fe9948
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/static.yml
Expand Up @@ -16,10 +16,10 @@ on:
# - cron: "*/10 * * * *"

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
#permissions:
# contents: read
# pages: write
# id-token: write

# Allow one concurrent deployment
concurrency:
Expand Down Expand Up @@ -130,3 +130,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 4fe9948

Please sign in to comment.