Skip to content

Commit

Permalink
update ci/cd and remove build dir
Browse files Browse the repository at this point in the history
  • Loading branch information
deadit committed Aug 28, 2023
1 parent ccc93fb commit 1d8852f
Show file tree
Hide file tree
Showing 158 changed files with 48 additions and 1,352 deletions.
73 changes: 46 additions & 27 deletions .github/workflows/main.yml
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 }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# production
/dist
/build

# misc
.DS_Store
Expand All @@ -24,3 +25,4 @@ yarn-error.log*
.vscode
/tmp
*.iml

162 changes: 0 additions & 162 deletions build/asset-manifest.json

This file was deleted.

Binary file removed build/favicon.png
Binary file not shown.
Binary file removed build/icon.png
Binary file not shown.
1 change: 0 additions & 1 deletion build/index.html

This file was deleted.

14 changes: 0 additions & 14 deletions build/manifest.json

This file was deleted.

Loading

0 comments on commit 1d8852f

Please sign in to comment.