# This workflow will do a clean install of node dependencies, build the source code and push the binaries to the deployment repository.
name: Continuous Delivery and Deployment

on:
    push:
        branches: [develop]

jobs:
    build:
        runs-on: ubuntu-latest

        strategy:
            matrix:
                node-version: [10.x]

        steps:
            - uses: actions/checkout@v2
            - name: Use Node.js ${{ matrix.node-version }}
              uses: actions/setup-node@v1
              with:
                  node-version: ${{ matrix.node-version }}
            - run: npm ci
            - run: npm run build
            - name: Deploy
              uses: s0/git-publish-subdir-action@master
              env:
                  REPO: git@github.com:bitshares/develop.bitshares.org.git
                  BRANCH: master
                  FOLDER: build/dist
                  SSH_PRIVATE_KEY: ${{ secrets.AUTOMATION_UI_DEPLOYMENT_KEY }}

# This workflow will do a clean install of node dependencies, build the source code and push the binaries to the deployment repository.
name: Continuous Delivery and Deployment

on:
    push:
        branches: [develop]

jobs:
    build:
        runs-on: ubuntu-latest

        strategy:
            matrix:
                node-version: [10.x]

        steps:
            - uses: actions/checkout@v2
            - name: Use Node.js ${{ matrix.node-version }}
              uses: actions/setup-node@v1
              with:
                  node-version: ${{ matrix.node-version }}
            - run: npm ci
            - run: npm run build
            - name: Create CNAME file
              uses: finnp/create-file-action@master
              env:
                  FILE_NAME: build/dist/CNAME
                  FILE_DATA: develop.bitshares.org
            - name: Deploy
              uses: s0/git-publish-subdir-action@master
              env:
                  REPO: git@github.com:bitshares/develop.bitshares.org.git
                  BRANCH: master
                  FOLDER: build/dist
                  SSH_PRIVATE_KEY: ${{ secrets.AUTOMATION_UI_DEPLOYMENT_KEY }}

Create CNAME file when auto-deploying to develop.bitshares.org
Create CNAME file when auto-deploying to develop.bitshares.org
