-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into update/dark-mode-logic
- Loading branch information
Showing
13 changed files
with
113 additions
and
135 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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Deploy Simplenote' | ||
description: 'Builds and deploys Simplenote to VIP Go branches' | ||
branding: | ||
icon: 'truck' | ||
color: 'green' | ||
inputs: | ||
APP_ID: | ||
description: 'Application ID' | ||
required: true | ||
GITHUB_TOKEN: | ||
description: 'GitHub Token' | ||
requried: true | ||
BRANCH: | ||
description: 'Branch' | ||
required: true | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
entrypoint: './.github/actions/deploy/entrypoint.sh' | ||
env: | ||
APP_ID: ${{ inputs.APP_ID }} | ||
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} | ||
BRANCH: ${{ inputs.BRANCH }} |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/sh -l | ||
|
||
COMMIT_BRANCH='' | ||
WEB_APP_URL='' | ||
APP_ENGINE_URL='' | ||
|
||
case $BRANCH in | ||
|
||
"refs/heads/develop") | ||
COMMIT_BRANCH='webapp-develop' | ||
WEB_APP_URL='https://simplenote-develop.go-vip.net' | ||
APP_ENGINE_URL='https://develop.simplenote.com' | ||
;; | ||
|
||
"refs/heads/master") | ||
COMMIT_BRANCH='webapp' | ||
WEB_APP_URL='https://simplenote.go-vip.co' | ||
APP_ENGINE_URL='https://app.simplenote.com' | ||
;; | ||
|
||
*) | ||
exit 0 | ||
;; | ||
esac | ||
|
||
# Install Node Modules | ||
npm install | ||
|
||
#Setup config-local to override config | ||
json_string=$(printf '{"app_id": "%s", "app_key": "12345", "development": false, "wpcc_client_id": "0", "wpcc_redirect_url": "https://simplenote.com", "is_app_engine": true, "web_app_url": "%s", "app_engine_url": "%s"}' "$APP_ID" "$WEB_APP_URL" "$APP_ENGINE_URL") | ||
echo "$json_string" > config-local.json | ||
|
||
# Build site | ||
NODE_ENV=production make build | ||
|
||
# Variables | ||
ORIGIN_URL=$(git config --get remote.origin.url) | ||
|
||
# Checkout deploy branch | ||
if [ "$(git branch | grep $COMMIT_BRANCH)" ] | ||
then | ||
git branch -D $COMMIT_BRANCH | ||
fi | ||
git checkout -b $COMMIT_BRANCH | ||
|
||
# Delete files not needed in production | ||
find . -maxdepth 1 ! -name '.git' ! -name 'dist' ! -name 'vip' -exec rm -rf {} \; | ||
|
||
# Copy vip files to base path | ||
cp -r vip/* ./ | ||
|
||
# Delete uneeded vip folder | ||
rm -rf vip | ||
|
||
# Push to deploy | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
|
||
git add --all | ||
git commit -m "Build: $COMMIT_BRANCH [ci skip]" | ||
git remote set-url origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} | ||
git push -f origin $COMMIT_BRANCH | ||
|
||
echo "Deployed Successfully!" | ||
|
||
exit 0 |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: ./.github/actions/deploy | ||
env: | ||
APP_ID: ${{ secrets.APP_ID }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: ${{ github.ref }} |
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
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
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
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