Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[web] Support preview deployments

Manav Rathi4feea0187911
diff --git a/.github/workflows/web-preview.yml b/.github/workflows/web-preview.yml
new file mode 100644
index 0000000000..4727576730
--- /dev/null
+++ b/.github/workflows/web-preview.yml
@@ -0,0 +1,52 @@
+name: "Preview (web)"
+
+on:
+ workflow_dispatch:
+ inputs:
+ app:
+ description: "App to build and deploy"
+ type: choice
+ required: true
+ default: "photos"
+ options:
+ - "accounts"
+ - "auth"
+ - "cast"
+ - "photos"
+
+jobs:
+ deploy:
+ runs-on: ubuntu-latest
+
+ defaults:
+ run:
+ working-directory: web
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Setup node and enable yarn caching
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ cache: "yarn"
+ cache-dependency-path: "docs/yarn.lock"
+
+ - name: Install dependencies
+ run: yarn install
+
+ - name: Build accounts
+ run: yarn build:${{ inputs.app }}
+
+ - name: Publish accounts
+ uses: cloudflare/pages-action@1
+ with:
+ accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+ projectName: ente
+ branch: preview
+ directory: web/apps/${{ inputs.app }}/out
+ wranglerVersion: "3"