-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #275 from TokenScript/staging
Staging
- Loading branch information
Showing
171 changed files
with
140,811 additions
and
7,442 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
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,76 @@ | ||
name: "socios-oauth2 CI" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- staging | ||
pull_request: | ||
branches: | ||
- "*" | ||
workflow_dispatch: | ||
|
||
env: | ||
PROJ_PATH: socios-oauth2 | ||
DEPLOY_URL: https://socios-oauth2.tokenscript.org/ | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: "npm" | ||
cache-dependency-path: ${{ env.PROJ_PATH }}/package-lock.json | ||
- run: | | ||
echo -n "Node version: " | ||
node -v | ||
echo -n "Npm version: " | ||
npm -v | ||
- name: build | ||
run: | | ||
cd "${PROJ_PATH}" | ||
npm ci | ||
npm run build | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: socios-oauth2 | ||
path: ${{ env.PROJ_PATH }}/dist/ | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: socios-oauth2 | ||
url: ${{ env.DEPLOY_URL }} | ||
needs: | ||
- build | ||
if: ${{ contains( | ||
fromJson('["push", "workflow_dispatch"]'), | ||
github.event_name) && | ||
contains( | ||
fromJson('["staging"]'), | ||
github.ref_name) | ||
}} | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: socios-oauth2 | ||
path: ${{ env.PROJ_PATH }}/dist/ | ||
- name: Deploy to EC2 | ||
uses: easingthemes/ssh-deploy@v4 | ||
with: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
REMOTE_HOST: 54.177.203.8 | ||
REMOTE_USER: ubuntu | ||
ARGS: "-aPz --delete" | ||
SOURCE: "${{ env.PROJ_PATH }}/dist/" | ||
TARGET: /opt/services/socios-oauth2/ | ||
SCRIPT_AFTER: | | ||
sudo systemctl restart socios-oauth2 | ||
- name: check deploy | ||
run: | | ||
for i in $(seq 15); do | ||
curl -sfL --connect-timeout 30 "${DEPLOY_URL}" && exit || sleep 5 | ||
done && exit 1 |
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 was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...e-bones-demo/dist/795.f6cd60318a520391.js → ...e-bones-demo/dist/296.1e4f5630973db106.js
Large diffs are not rendered by default.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.