-
Notifications
You must be signed in to change notification settings - Fork 17
42 lines (40 loc) · 1.27 KB
/
publish-pages.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Deploy site and app
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3
# PikaTorrent site
- name: Build site
run: npm ci && npm run build:site
- name: Publish site
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: pikatorrent-site
directory: apps/site/out
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# PikaTorrent app
# We can not upload assets/node_modules with wrangler for now
# See https://github.com/cloudflare/workers-sdk/issues/3615
# - name: Build app
# run: SIGNALING_URL=${{ vars.SIGNALING_URL }} npm run build:web
# - name: Publish app
# uses: cloudflare/pages-action@1
# with:
# apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# projectName: pikatorrent-app
# directory: apps/app/dist
# gitHubToken: ${{ secrets.GITHUB_TOKEN }}