Skip to content

Commit

Permalink
[web] Deploy photos (#1147)
Browse files Browse the repository at this point in the history
Deploy web.ente.io

This is the first deployment since we switched to this monorepo. The
previous deployment of photos app was
ente-io/photos-web#1595.
  • Loading branch information
mnvr authored Mar 19, 2024
2 parents 698abe0 + 449284a commit 6c42ce6
Show file tree
Hide file tree
Showing 636 changed files with 40,699 additions and 13,047 deletions.
Binary file added .github/assets/github-badge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions .github/assets/mastodon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions .github/assets/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions .github/workflows/auth-crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 workflow on specific days of the week]
- cron: "50 1 * * 2,5"
# Also allow manually running the workflow
workflow_dispatch:

jobs:
synchronize-with-crowdin:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/auth-lint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: "Lint (auth)"

on:
# Run on every push to branches (this also covers pull requests)
# Run on every push to a branch other than main that changes auth/
push:
# See: [Note: Specify branch when specifying a path filter]
branches: ["**"]
# Only run if something changes in these paths
branches-ignore: [main]
paths:
- "auth/**"
- ".github/workflows/auth-lint.yml"
Expand Down Expand Up @@ -35,3 +33,6 @@ jobs:
- run: flutter pub get

- run: flutter analyze --no-fatal-infos

- name: Verify custom icon JSON
run: cat assets/custom-icons/_data/custom-icons.json | jq empty
7 changes: 2 additions & 5 deletions .github/workflows/auth-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on:
- "auth-v*"

env:
FLUTTER_VERSION: "3.16.9"
FLUTTER_VERSION: "3.13.4"

jobs:
build-ubuntu:
Expand Down Expand Up @@ -118,14 +118,11 @@ jobs:
updateOnlyUnreleased: true

- name: Upload AAB to PlayStore
# Temporarily disable GP upload, enable this once desktop build
# testing is complete.
if: false
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: io.ente.auth
releaseFiles: build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab
releaseFiles: auth/build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab
track: internal

build-windows:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cli-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@ jobs:
release_name: ${{ github.ref_name }}
goversion: "1.20"
project_path: "./cli"
pre_command: export CGO_ENABLED=0
build_flags: "-trimpath"
ldflags: "-X main.AppVersion=${{ github.ref_name }} -s -w"
md5sum: false
sha256sum: true
24 changes: 24 additions & 0 deletions .github/workflows/copycat-db-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Release (copycat-db)"

on:
workflow_dispatch: # Run manually

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Check out code

- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & Push
with:
dockerfile: infra/copycat-db/Dockerfile
directory: infra/copycat-db
image: ente/copycat-db
registry: rg.fr-par.scw.cloud
enableBuildKit: true
buildArgs: GIT_COMMIT=${GITHUB_SHA}
tags: ${GITHUB_SHA}, latest
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
47 changes: 47 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Deploy (docs)"

on:
# Run on every push to main that changes docs/
push:
branches: [main]
paths:
- "docs/**"
- ".github/workflows/docs-deploy.yml"
# Also allow manually running the workflow
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest

defaults:
run:
working-directory: docs

steps:
- name: Checkout code
uses: actions/checkout@v4

- 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 production site
# Will create docs/.vitepress/dist
run: yarn build

- name: Publish
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: help
directory: docs/docs/.vitepress/dist
wranglerVersion: "3"
37 changes: 37 additions & 0 deletions .github/workflows/docs-verify-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Verify build (docs)"

# Preflight build of docs. This allows us to ensure that yarn build is
# succeeding before we merge the PR into main.

on:
# Run on every push to a branch other than main that changes docs/
push:
branches-ignore: [main]
paths:
- "docs/**"
- ".github/workflows/docs-verify-build.yml"

jobs:
verify-build:
runs-on: ubuntu-latest

defaults:
run:
working-directory: docs

steps:
- name: Checkout code
uses: actions/checkout@v4

- 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 production site
run: yarn build
9 changes: 5 additions & 4 deletions .github/workflows/mobile-crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 workflow on specific days of the week]
- cron: "40 1 * * 2,5"
# Also allow manually running the workflow
workflow_dispatch:

jobs:
synchronize-with-crowdin:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/mobile-lint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: "Lint (mobile)"

on:
# Run on every push (this also covers pull requests)
# Run on every push to a branch other than main that changes mobile/
push:
# See: [Note: Specify branch when specifying a path filter]
branches: ["**"]
# Only run if something changes in these paths
branches-ignore: [main, f-droid]
paths:
- "mobile/**"
- ".github/workflows/mobile-lint.yml"
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/mobile-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,20 @@ jobs:
encodedString: ${{ secrets.SIGNING_KEY_PHOTOS }}

- name: Build independent APK
run: flutter build apk --release --flavor independent && mv build/app/outputs/flutter-apk/app-independent-release.apk build/app/outputs/flutter-apk/ente.apk
run: |
flutter build apk --release --flavor independent
mv build/app/outputs/flutter-apk/app-independent-release.apk build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk
env:
SIGNING_KEY_PATH: "/home/runner/work/_temp/keystore/ente_photos_key.jks"
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS_PHOTOS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD_PHOTOS }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_PHOTOS }}

- name: Checksum
run: sha256sum build/app/outputs/flutter-apk/ente.apk > build/app/outputs/flutter-apk/sha256sum
run: sha256sum build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk > build/app/outputs/flutter-apk/sha256sum

- name: Create a draft GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "mobile/build/app/outputs/flutter-apk/ente.apk,mobile/build/app/outputs/flutter-apk/sha256sum"
artifacts: "mobile/build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk,mobile/build/app/outputs/flutter-apk/sha256sum"
draft: true
6 changes: 2 additions & 4 deletions .github/workflows/server-lint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: "Lint (server)"

on:
# Run on every push (this also covers pull requests)
# Run on every push to a branch other than main that changes server/
push:
# See: [Note: Specify branch when specifying a path filter]
branches: ["**"]
# Only run if something changes in these paths
branches-ignore: [main]
paths:
- "server/**"
- ".github/workflows/server-lint.yml"
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/web-crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@ 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
# [Note: Run workflow on specific days of the week]
#
# The last (5th) component of the cron syntax denotes the day of the
# week, with 0 == SUN and 6 == SAT. So, for example, to run on every TUE
# and FRI, this can be set to `2,5`.
#
# See also: [Note: Run workflow every 24 hours]
- cron: "20 1 * * 2,5"
# Also allow manually running the workflow
workflow_dispatch:

jobs:
synchronize-with-crowdin:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/web-deploy-accounts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Deploy (accounts)"

on:
push:
# Run workflow on pushes to the deploy/accounts
branches: [deploy/accounts]

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: deploy/accounts
directory: web/apps/accounts/out
wranglerVersion: "3"
43 changes: 43 additions & 0 deletions .github/workflows/web-deploy-auth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Deploy (auth)"

on:
push:
# Run workflow on pushes to the deploy/auth
branches: [deploy/auth]

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 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: deploy/auth
directory: web/apps/auth/out
wranglerVersion: "3"
Loading

0 comments on commit 6c42ce6

Please sign in to comment.