[add] release dev #2
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: Release DEV | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: | |
- dev | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build-front-dev: | |
name: Build development version | |
runs-on: ubuntu-latest | |
if: contains(github.event.commits.*.message, '[skip ci]') == false | |
steps: | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '16' | |
- name: Copy Repo Files | |
uses: actions/checkout@v2 | |
- name: Build Front | |
env: | |
NODE_ENV: development | |
run: | | |
cd front | |
printf "${{secrets.FRONT_ENV_DEVELOPMENT}}" > ./.env.development | |
yarn install --production=false | |
yarn build:development | |
mv build ../ | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '12.14.0' | |
- name: Build Dashboard | |
env: | |
NODE_ENV: development | |
run: | | |
cd dashboard | |
printf "${{secrets.DASHBOARD_ENV_DEVELOPMENT}}" > ./.env.production | |
npm install | |
npm run build:prod | |
mv dist dashboard | |
mv dashboard ../build/ | |
- name: Install SSH Key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
known_hosts: 'a' | |
- name: Upload Builds | |
env: | |
SSH_USERNAME: ${{ secrets.SSH_USERNAME }} | |
SSH_HOST: ${{ secrets.SSH_HOST }} | |
REMOTE_UPLOAD_PATH: ${{ secrets.DEV_REMOTE_UPLOAD_PATH }} | |
run: | | |
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts | |
./scripts/upload.sh | |
- name: get-npm-version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@master |