Skip to content

Commit 8b8c529

Browse files
committed
chore(publish): switch to Cloudflare Pages
This allows us to do redirects and other cool things.
1 parent cdc2ff8 commit 8b8c529

2 files changed

Lines changed: 8 additions & 29 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ on:
99

1010
permissions:
1111
contents: read
12-
pages: write
13-
id-token: write
1412

1513
concurrency:
16-
group: pages
17-
cancel-in-progress: false
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
1816

1917
jobs:
2018
build:
@@ -35,10 +33,6 @@ jobs:
3533
node-version: '20'
3634
cache: pnpm
3735

38-
- name: Setup Pages
39-
if: github.ref == 'refs/heads/develop' && github.event_name == 'push' && github.repository == 'connectbot/connectbot.github.io'
40-
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
41-
4236
- name: Restore cache
4337
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
4438
with:
@@ -60,26 +54,10 @@ jobs:
6054
- name: Build
6155
run: pnpm run build
6256

63-
- name: Upload artifact
57+
- name: Deploy to Cloudflare Pages
6458
if: github.ref == 'refs/heads/develop' && github.event_name == 'push' && github.repository == 'connectbot/connectbot.github.io'
65-
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
59+
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
6660
with:
67-
path: ./out
68-
69-
deploy:
70-
environment:
71-
name: github-pages
72-
url: ${{ steps.deployment.outputs.page_url }}
73-
runs-on: ubuntu-latest
74-
needs: build
75-
if: github.ref == 'refs/heads/develop' && github.event_name == 'push' && github.repository == 'connectbot/connectbot.github.io'
76-
steps:
77-
- name: Deploy to GitHub Pages
78-
id: deployment
79-
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
80-
81-
- name: Purge Cloudflare cache
82-
uses: jakejarvis/cloudflare-purge-action@eee6dba0236093358f25bb1581bd615dc8b3d8e3 # v0.3.0
83-
env:
84-
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
85-
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
61+
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
62+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
63+
command: pages deploy ./out --project-name=connectbot-website

public/_redirects

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bug /bugs

0 commit comments

Comments
 (0)