-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1ec81cb
commit f4a10d0
Showing
3 changed files
with
8 additions
and
92 deletions.
There are no files selected for viewing
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,5 +1,5 @@ | ||
name: Automated | ||
"on": | ||
name: Automated Deployment | ||
'on': | ||
push: | ||
branches: | ||
- master | ||
|
@@ -13,7 +13,7 @@ jobs: | |
uses: jaid/[email protected] | ||
with: | ||
direction: overwrite-github | ||
githubToken: "${{ secrets.GITHUB }}" | ||
githubToken: '${{ secrets.GITHUB }}' | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -28,56 +28,16 @@ jobs: | |
@semantic-release/git | ||
@semantic-release/github | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}" | ||
GITHUB_TOKEN: '${{ secrets.GITHUB }}' | ||
NPM_TOKEN: '${{ secrets.NPM_TOKEN }}' | ||
outputs: | ||
new_release_published: "${{ steps.semantic.outputs.new_release_published }}" | ||
new_release_version: "${{ steps.semantic.outputs.new_release_version }}" | ||
cdn: | ||
runs-on: ubuntu-latest | ||
needs: release | ||
if: needs.release.outputs.new_release_published == 'true' | ||
env: | ||
VERSION: "${{ needs.release.outputs.new_release_version }}" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: setup nodejs | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.15.4 | ||
- name: yarn install | ||
run: > | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > | ||
.npmrc | ||
new_release_published: '${{ steps.semantic.outputs.new_release_published }}' | ||
new_release_version: '${{ steps.semantic.outputs.new_release_version }}' | ||
|
||
yarn install | ||
- name: yarn build | ||
run: yarn build | ||
- name: upload bundle as version | ||
uses: CoCreate-app/CoCreate-s3@master | ||
with: | ||
aws-key-id: "${{ secrets.AWSACCESSKEYID }}" | ||
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}" | ||
bucket: testcrudbucket | ||
source: ./dist | ||
destination: "/mongodb/${{env.VERSION}}" | ||
acl: public-read | ||
- name: upload bundle as latest | ||
uses: CoCreate-app/CoCreate-s3@master | ||
with: | ||
aws-key-id: "${{ secrets.AWSACCESSKEYID }}" | ||
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}" | ||
bucket: testcrudbucket | ||
source: ./dist | ||
destination: /mongodb/latest | ||
acl: public-read | ||
invalidations: true | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: update documentation | ||
uses: CoCreate-app/CoCreate-docs@master |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ const {dotNotationToObject, searchData, sortData} = require('@cocreate/utils') | |
|
||
function mongoClient(dbUrl) { | ||
try { | ||
dbUrl = "mongodb+srv://cocreate-app:[email protected]" || dbUrl || process.env.MONGO_URL || config.db_url; | ||
dbUrl = dbUrl || process.env.MONGO_URL || config.db_url; | ||
if (!dbUrl || !dbUrl.includes('mongodb')) | ||
console.log('CoCreate.config.js missing dbUrl') | ||
dbClient = MongoClient.connect(dbUrl, { useNewUrlParser: true, useUnifiedTopology: true }); | ||
|