Skip to content

Commit 0ab4bb4

Browse files
committed
Automatic cloudflare preview
1 parent 4675e6d commit 0ab4bb4

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/preview.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build website preview
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- master
7+
8+
jobs:
9+
build-and-deploy:
10+
if: ${{ secrets.CLOUDFLARE_ACCOUNT != '' && secrets.CLOUDFLARE_API_TOKEN != '' }}
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- uses: actions/setup-python@v4
17+
with:
18+
python-version: "3.14"
19+
20+
- name: Codespell
21+
run: |
22+
pip install codespell tomli
23+
codespell
24+
25+
- name: Install requirements to generate Psycopg 3 docs
26+
run: sudo apt-get install -y libgeos-dev
27+
28+
- name: Install
29+
run: make setup
30+
31+
- name: Build
32+
run: make
33+
34+
- name: Deploy
35+
uses: cloudflare/wrangler-action@v3
36+
with:
37+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
38+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT }}
39+
command: pages deploy build --project-name psycopg-org-website

0 commit comments

Comments
 (0)