update interface #30
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
name: Deploy app | |
on: | |
push: | |
branches: | |
- 'main' | |
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: 16.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: | |
needs: build | |
name: Deploy | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Extract Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ github.sha }} | |
path: ~/build | |
- name: Deploy to host | |
uses: garygrossgarten/github-action-scp@release | |
with: | |
local: /home/runner/build | |
remote: /var/www/html/dexy-usd-bank-ui/build | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
privateKey: ${{ secrets.DEPLOY_KEY }} |