Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo #35

Merged
merged 3 commits into from
Jan 4, 2023
Merged

Demo #35

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: demo
on:
push:
branches:
- master
schedule:
- cron: '0 0 * * *' # Everyday at 12am
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: demo
env:
CI: false
REACT_APP_CLIENT_ID: ${{ secrets.REACT_APP_CLIENT_ID }}
REACT_APP_CLIENT_SECRET: ${{ secrets.REACT_APP_CLIENT_SECRET }}
REACT_APP_ENDPOINT_URL: ${{ secrets.REACT_APP_ENDPOINT_URL }}
REACT_APP_WEBSOCKET_ENDPOINT: ${{ secrets.REACT_APP_WEBSOCKET_ENDPOINT }}
REACT_APP_ENCRYPT: ${{ secrets.REACT_APP_ENCRYPT }}
REACT_APP_LICENSE: ${{ secrets.REACT_APP_LICENSE }}
REACT_APP_DAM_LICENSE: ${{ secrets.REACT_APP_DAM_LICENSE }}
REACT_APP_TEST_MODE: ${{ secrets.REACT_APP_TEST_MODE }}
REACT_APP_DEMO_USER: ${{ secrets.REACT_APP_DEMO_USER }}
REACT_APP_DEMO_PASSWORD: ${{ secrets.REACT_APP_DEMO_PASSWORD }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14

- run: yarn install
- run: yarn build

- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: unnecessary

- name: Adding Known Hosts
run: ssh-keyscan -p ${{ secrets.SSH_PORT}} -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts

- name: Deploy with rsync
run: rsync -avz -e "ssh -p ${{ secrets.SSH_PORT }}" ./build/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_PATH }}
41 changes: 41 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: develop
on:
push:
branches:
- develop
schedule:
- cron: '0 0 * * *' # Everyday at 12am
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: develop
env:
CI: false
REACT_APP_CLIENT_ID: ${{ secrets.REACT_APP_CLIENT_ID }}
REACT_APP_CLIENT_SECRET: ${{ secrets.REACT_APP_CLIENT_SECRET }}
REACT_APP_ENDPOINT_URL: ${{ secrets.REACT_APP_ENDPOINT_URL }}
REACT_APP_WEBSOCKET_ENDPOINT: ${{ secrets.REACT_APP_WEBSOCKET_ENDPOINT }}
REACT_APP_ENCRYPT: ${{ secrets.REACT_APP_ENCRYPT }}
REACT_APP_LICENSE: ${{ secrets.REACT_APP_LICENSE }}
REACT_APP_DAM_LICENSE: ${{ secrets.REACT_APP_DAM_LICENSE }}
REACT_APP_TEST_MODE: ${{ secrets.REACT_APP_TEST_MODE }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14

- run: yarn install
- run: yarn build

- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: unnecessary

- name: Adding Known Hosts
run: ssh-keyscan -p ${{ secrets.SSH_PORT}} -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts

- name: Deploy with rsync
run: rsync -avz -e "ssh -p ${{ secrets.SSH_PORT }}" ./build/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_PATH }}