-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c012694
commit fa19b38
Showing
2 changed files
with
27 additions
and
8 deletions.
There are no files selected for viewing
28 changes: 20 additions & 8 deletions
28
.github/workflows/realm-staging.yml → .github/workflows/realm.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,36 @@ | ||
name: Realm Deploy Staging | ||
name: Realm Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
workflow_call: | ||
inputs: | ||
environment: | ||
description: The Github environment to load secrets from | ||
type: string | ||
required: true | ||
sha: | ||
description: The commit SHA to deploy | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-latest | ||
environment: staging | ||
environment: ${{ inputs.environment }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: "Install the Realm CLI" | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.sha }} | ||
|
||
- name: "Install the Realm (Atlas) CLI" | ||
run: | | ||
npm install -g mongodb-realm-cli | ||
- name: Login | ||
run: | | ||
realm-cli login --api-key="${{ secrets.REALM_API_PUBLIC_KEY }}" --private-api-key="${{ secrets.REALM_API_PRIVATE_KEY }}" --realm-url https://realm.mongodb.com --atlas-url https://cloud.mongodb.com | ||
- name: Push | ||
run: | | ||
cd site/realm | ||
realm-cli push --remote="${{ secrets.GATSBY_REALM_APP_ID }}" -y | ||
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