Skip to content

armgit / ente

Public Imported from GitHub
0

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

Add web-nightly and update existing

Manav Rathi5d4486fce358
diff --git a/.github/workflows/auth-crowdin.yml b/.github/workflows/auth-crowdin.yml
index ea67dec7cf..d472cf594a 100644
--- a/.github/workflows/auth-crowdin.yml
+++ b/.github/workflows/auth-crowdin.yml
@@ -3,15 +3,16 @@ name: "Sync Crowdin translations (auth)"
on:
push:
paths:
- # Run action when auth's intl_en.arb is changed
+ # Run workflow when auth's intl_en.arb is changed
- "mobile/lib/l10n/arb/app_en.arb"
# Or the workflow itself is changed
- ".github/workflows/auth-crowdin.yml"
branches: [main]
schedule:
- # Run every 24 hours - https://crontab.guru/#0_*/24_*_*_*
- - cron: "0 */24 * * *"
- workflow_dispatch: # Allow manually running the action
+ # See: [Note: Run every 24 hours]
+ - cron: "50 1 * * *"
+ # Also allow manually running the workflow
+ workflow_dispatch:
jobs:
synchronize-with-crowdin:
diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml
index 66597fefc3..01b0c2254a 100644
--- a/.github/workflows/docs-deploy.yml
+++ b/.github/workflows/docs-deploy.yml
@@ -7,7 +7,7 @@ on:
paths:
- "docs/**"
- ".github/workflows/docs-deploy.yml"
- # Also allow manually running the action
+ # Also allow manually running the workflow
workflow_dispatch:
jobs:
diff --git a/.github/workflows/mobile-crowdin.yml b/.github/workflows/mobile-crowdin.yml
index dbd978745b..e12ab9aac7 100644
--- a/.github/workflows/mobile-crowdin.yml
+++ b/.github/workflows/mobile-crowdin.yml
@@ -3,15 +3,16 @@ name: "Sync Crowdin translations (mobile)"
on:
push:
paths:
- # Run action when mobiles's intl_en.arb is changed
+ # Run workflow when mobiles's intl_en.arb is changed
- "mobile/lib/l10n/intl_en.arb"
# Or the workflow itself is changed
- ".github/workflows/mobile-crowdin.yml"
branches: [main]
schedule:
- # Run every 24 hours - https://crontab.guru/#0_*/24_*_*_*
- - cron: "0 */24 * * *"
- workflow_dispatch: # Allow manually running the action
+ # See: [Note: Run every 24 hours]
+ - cron: "40 1 * * *"
+ # Also allow manually running the workflow
+ workflow_dispatch:
jobs:
synchronize-with-crowdin:
diff --git a/.github/workflows/web-crowdin.yml b/.github/workflows/web-crowdin.yml
index b55aad55de..c8acb23223 100644
--- a/.github/workflows/web-crowdin.yml
+++ b/.github/workflows/web-crowdin.yml
@@ -3,15 +3,16 @@ name: "Sync Crowdin translations (web)"
on:
push:
paths:
- # Run action when web's en-US/translation.json is changed
+ # Run workflow when web's en-US/translation.json is changed
- "web/apps/photos/public/locales/en-US/translation.json"
# Or the workflow itself is changed
- ".github/workflows/web-crowdin.yml"
branches: [main]
schedule:
- # Run every 24 hours - https://crontab.guru/#0_*/24_*_*_*
- - cron: "0 */24 * * *"
- workflow_dispatch: # Allow manually running the action
+ # See: [Note: Run every 24 hours]
+ - cron: "20 1 * * *"
+ # Also allow manually running the workflow
+ workflow_dispatch:
jobs:
synchronize-with-crowdin:
diff --git a/.github/workflows/web-nightly.yml b/.github/workflows/web-nightly.yml
new file mode 100644
index 0000000000..1ca3cfc159
--- /dev/null
+++ b/.github/workflows/web-nightly.yml
@@ -0,0 +1,92 @@
+name: "Nightly (web)"
+
+on:
+ schedule:
+ # [Note: Run every 24 hours]
+ #
+ # Run every 24 hours - First field is minute, second is hour of the day
+ # This runs 23:15 UTC everyday - 1 and 15 are just arbitrary offset to
+ # avoid scheduling it on the exact hour, as suggested by GitHub.
+ #
+ # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
+ # https://crontab.guru/
+ #
+ - cron: "15 23 * * *"
+ # Also allow manually running the workflow
+ workflow_dispatch:
+
+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:accounts
+
+ - name: Publish accounts
+ uses: cloudflare/pages-action@1
+ with:
+ accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+ projectName: ente
+ branch: n-accounts
+ directory: web/apps/accounts/out
+ wranglerVersion: "3"
+
+ - name: Build auth
+ run: yarn build:auth
+
+ - name: Publish auth
+ uses: cloudflare/pages-action@1
+ with:
+ accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+ projectName: ente
+ branch: n-auth
+ directory: web/apps/auth/out
+ wranglerVersion: "3"
+
+ - name: Build cast
+ run: yarn build:cast
+
+ - name: Publish cast
+ uses: cloudflare/pages-action@1
+ with:
+ accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+ projectName: ente
+ branch: n-cast
+ directory: web/apps/cast/out
+ wranglerVersion: "3"
+
+ - name: Build photos
+ run: yarn build:photos
+
+ - name: Publish photos
+ uses: cloudflare/pages-action@1
+ with:
+ accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+ projectName: ente
+ branch: n-photos
+ directory: web/apps/photos/out
+ wranglerVersion: "3"