-
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
Showing
158 changed files
with
48 additions
and
1,352 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,36 +1,55 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the workflow will run | ||
name: Deploy app | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: . | ||
branches: | ||
- 'master' | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build: | ||
name: Build Artifacts for Test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Build Artifacts | ||
uses: actions/checkout@v3 | ||
|
||
- name: Init Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Up Caches | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Generate deployable artifacts | ||
run: | | ||
yarn | ||
CI=false yarn build | ||
- name: Store Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ github.sha }} | ||
path: build | ||
retention-days: 1 | ||
deploy: | ||
# The type of runner that the job will run on | ||
needs: build | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install SSH key | ||
uses: shimataro/ssh-key-action@v2 | ||
- name: Extract Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
key: ${{ secrets.DEPLOY_KEY }} | ||
known_hosts: ${{ secrets.KNOWN_HOSTS }} | ||
|
||
- name: Deploy the app | ||
run: bash ./tools/deploy.sh | ||
name: ${{ github.sha }} | ||
path: ~/build | ||
- name: Deploy to host | ||
uses: garygrossgarten/github-action-scp@release | ||
with: | ||
local: /home/runner/build | ||
remote: /data/explorer/front/build | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
privateKey: ${{ secrets.DEPLOY_KEY }} |
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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
|
||
# production | ||
/dist | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
|
@@ -24,3 +25,4 @@ yarn-error.log* | |
.vscode | ||
/tmp | ||
*.iml | ||
|
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.