Skip to content

Commit 439e5ab

Browse files
committed
deploy on cf pages
1 parent 7e97020 commit 439e5ab

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on: [push]
2+
3+
jobs:
4+
publish:
5+
runs-on: ubuntu-latest
6+
permissions:
7+
contents: read
8+
deployments: write
9+
name: Publish to Cloudflare Pages
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
14+
- name: Build
15+
run: |
16+
python3 -m venv .venv
17+
CFLAGS=-O1 ./build.sh
18+
cp index.html out
19+
rm out/compiled.js
20+
21+
- name: Publish to Cloudflare Pages
22+
uses: cloudflare/pages-action@v1
23+
with:
24+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
25+
accountId: b8079ffa92c97010f2a8d759e24cc782
26+
projectName: doompdf
27+
directory: out

index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="refresh" content="0; url=/doom.pdf">
5+
</head>
6+
<body>
7+
<p>Redirecting to <a href="/doom.pdf">/doom.pdf</a>...</p>
8+
</body>
9+
</html>

0 commit comments

Comments
 (0)