Skip to content

Commit

Permalink
deploy on cf pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ading2210 committed Jan 12, 2025
1 parent 7e97020 commit 2f300ae
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on: [push]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build
run: |
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
CFLAGS=-O1 ./build.sh
cp index.html out
rm out/compiled.js
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: b8079ffa92c97010f2a8d759e24cc782
projectName: doompdf
directory: out
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This is a Doom source port that runs inside a PDF file.

Play it here: [doom.pdf](https://doompdf.pages.dev/doom.pdf)

## Javascript in a PDF

You might expect PDF files to only be comprised of static documents, but surprisingly, the PDF file format supports Javascript with its own separate standard library. Modern browsers (Chromium, Firefox) implement this as part of their PDF engines. However, the APIs that are available in the browser are much more limited.
Expand Down
9 changes: 9 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=/doom.pdf">
</head>
<body>
<p>Redirecting to <a href="/doom.pdf">/doom.pdf</a>...</p>
</body>
</html>

0 comments on commit 2f300ae

Please sign in to comment.