Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into cms
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 26, 2025
2 parents 15006bd + 00c2263 commit 9065389
Show file tree
Hide file tree
Showing 52 changed files with 360 additions and 137 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "decap-next-test"
}
}
60 changes: 60 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Auto Merge CMS Branch

on:
schedule:
# Run every 5 minutes to check for inactivity
- cron: '*/5 * * * *'

# Allow manual triggering
workflow_dispatch:

jobs:
auto-merge:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches

- name: Check CMS branch and merge if inactive
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if git fetch origin cms; then
last_commit_time=$(git log -1 --format=%ct "origin/cms")
current_time=$(date +%s)
time_diff=$(( ($current_time - $last_commit_time) / 60 ))
if [ $time_diff -gt 20 ]; then
echo "CMS branch has been inactive for $time_diff minutes"
git config user.name "GitHub Actions Bot"
git config user.email "actions@github.com"
git checkout cms
if git merge origin/main --no-edit; then
echo "Successfully merged main into cms"
git checkout main
git merge cms --no-edit
git push origin main
echo "Successfully merged cms into main"
else
echo "Merge conflicts detected in cms branch, skipping..."
git merge --abort
fi
else
echo "CMS branch has been active within the last 20 minutes, skipping..."
fi
else
echo "CMS branch not found"
fi
permissions:
contents: write
pull-requests: write
10 changes: 10 additions & 0 deletions apphosting.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Settings for Backend (on Cloud Run).
# See https://firebase.google.com/docs/app-hosting/configure#cloud-run
runConfig:
minInstances: 1
maxInstances: 10
concurrency: 80
cpu: 1
memoryMiB: 512

# Environment variables and secrets.
env:
- variable: CLIENT_ID
secret: CLIENT_ID
Expand Down
1 change: 1 addition & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
11 changes: 9 additions & 2 deletions public/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
backend:
name: github
repo: brown-ccv/mmp-next
base_url: https://mmp-docker-974587953292.us-central1.run.app/
branch: cms
base_url: https://mmp.research.brown.edu/
auth_endpoint: api/auth
media_folder: public/images
collections:
Expand Down Expand Up @@ -86,6 +87,13 @@ collections:
label: Classification
widget: select
options: [ 'Book', 'Chapter', 'Article', 'Dissertation' ]
- name: tags
label: Project Tags
widget: list
min: 1
max: 2
collapsed: false
field: { label: Project, name: project, widget: select, options: ["MMP", "LAMP"] }
- name: author
label: Author(s)
widget: text
Expand Down Expand Up @@ -144,7 +152,6 @@ collections:
required: false
label: English File
widget: file

- name: news
label: News
identifier_field: pubDate
Expand Down
Binary file added public/images/doug-massey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/jorge-durand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9065389

Please sign in to comment.