From fd99821c3c20e64631d165d6989a35b444fb14bf Mon Sep 17 00:00:00 2001 From: Stefan Date: Thu, 17 Mar 2022 14:52:18 +0100 Subject: [PATCH] add deployment environment for develop --- .github/workflows/build-release-binaries.yml | 2 +- .../npm-build-and-deploy-develop.yml | 36 -------------- .../npm-build-and-deploy-staging.yml | 36 -------------- .github/workflows/npm-build-and-deploy.yml | 48 +++++++++++++++++++ 4 files changed, 49 insertions(+), 73 deletions(-) delete mode 100644 .github/workflows/npm-build-and-deploy-develop.yml delete mode 100644 .github/workflows/npm-build-and-deploy-staging.yml create mode 100644 .github/workflows/npm-build-and-deploy.yml diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index 7304df0bd8..87e41534a3 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -1,4 +1,4 @@ -name: Release Bitshares-ui +name: Build local wallet on: push: diff --git a/.github/workflows/npm-build-and-deploy-develop.yml b/.github/workflows/npm-build-and-deploy-develop.yml deleted file mode 100644 index d2612d6ac8..0000000000 --- a/.github/workflows/npm-build-and-deploy-develop.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and push the binaries to the deployment repository. -name: Build & Deploy develop - -on: - push: - branches: [develop] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [16.13.1] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: corepack enable - - run: yarn install --network-concurrency 1 --frozen-lockfile - - run: yarn run build-hash - - name: Create CNAME file - uses: finnp/create-file-action@master - env: - FILE_NAME: build/hash-history/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/hash-history - SSH_PRIVATE_KEY: ${{ secrets.AUTOMATION_UI_DEPLOYMENT_KEY }} diff --git a/.github/workflows/npm-build-and-deploy-staging.yml b/.github/workflows/npm-build-and-deploy-staging.yml deleted file mode 100644 index d67be492ac..0000000000 --- a/.github/workflows/npm-build-and-deploy-staging.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and push the binaries to the deployment repository. -name: Build & Deploy staging - -on: - push: - branches: [staging] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [16.13.1] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: corepack enable - - run: yarn install --network-concurrency 1 --frozen-lockfile - - run: yarn run build-hash - - name: Create CNAME file - uses: finnp/create-file-action@master - env: - FILE_NAME: build/hash-history/CNAME - FILE_DATA: staging.bitshares.org - - name: Deploy - uses: s0/git-publish-subdir-action@master - env: - REPO: git@github.com:bitshares/bitshares-ui-staging.git - BRANCH: master - FOLDER: build/hash-history - SSH_PRIVATE_KEY: ${{ secrets.AUTOMATION_STAGING_DEPLOYMENT_KEY }} diff --git a/.github/workflows/npm-build-and-deploy.yml b/.github/workflows/npm-build-and-deploy.yml new file mode 100644 index 0000000000..fa165a2d47 --- /dev/null +++ b/.github/workflows/npm-build-and-deploy.yml @@ -0,0 +1,48 @@ +# This workflow will do a clean install of node dependencies, build the source code and push the binaries to the deployment repository. +name: Build & deploy web wallet + +on: + push: + branches: [develop, staging, master] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 16.13.1 + uses: actions/setup-node@v1 + with: + node-version: 16.13.1 + - run: corepack enable + - run: yarn install --network-concurrency 1 --frozen-lockfile + - run: yarn run build-hash + - uses: actions/upload-artifact@v3 + with: + name: build-hash-binaries + path: build/hash-history + + deployment: + needs: build + runs-on: ubuntu-latest + environment: + name: ${{ github.ref_name }} + + steps: + - uses: actions/download-artifact@v3 + with: + name: build-hash-binaries + path: build/hash-history + - name: Create CNAME file + uses: finnp/create-file-action@master + env: + FILE_NAME: build/hash-history/CNAME + FILE_DATA: ${{ secrets.DEPLOYMENT_URL }} + - name: Push to target repository + uses: s0/git-publish-subdir-action@master + env: + REPO: git@github.com:bitshares/${{ secrets.DEPLOYMENT_REPOSITORY }}.git + BRANCH: master + FOLDER: build/hash-history + SSH_PRIVATE_KEY: ${{ secrets.DEPLOYMENT_KEY }}