Nightly (web) #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Nightly (web)" | |
on: | |
schedule: | |
# [Note: Run workflow 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 | |
env: | |
NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT: https://albums.ente.sh | |
- 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" |