|
| 1 | +# This workflow will do a clean install of node dependencies, build the source code and push the binaries to the deployment repository. |
| 2 | +name: Build & deploy web wallet |
| 3 | + |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: [develop, staging, master] |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v2 |
| 14 | + - name: Use Node.js 16.13.1 |
| 15 | + uses: actions/setup-node@v1 |
| 16 | + with: |
| 17 | + node-version: 16.13.1 |
| 18 | + - run: corepack enable |
| 19 | + - run: yarn install --network-concurrency 1 --frozen-lockfile |
| 20 | + - run: yarn run build-hash |
| 21 | + - uses: actions/upload-artifact@v3 |
| 22 | + with: |
| 23 | + name: build-hash-binaries |
| 24 | + path: build/hash-history |
| 25 | + |
| 26 | + deployment: |
| 27 | + needs: build |
| 28 | + runs-on: ubuntu-latest |
| 29 | + environment: |
| 30 | + name: ${{ github.ref_name }} |
| 31 | + |
| 32 | + steps: |
| 33 | + - uses: actions/download-artifact@v3 |
| 34 | + with: |
| 35 | + name: build-hash-binaries |
| 36 | + path: build/hash-history |
| 37 | + - name: Create CNAME file |
| 38 | + uses: finnp/create-file-action@master |
| 39 | + env: |
| 40 | + FILE_NAME: build/hash-history/CNAME |
| 41 | + FILE_DATA: ${{ secrets.DEPLOYMENT_URL }} |
| 42 | + - name: Push to target repository |
| 43 | + uses: s0/git-publish-subdir-action@master |
| 44 | + env: |
| 45 | + REPO: git@github.com:bitshares/${{ secrets.DEPLOYMENT_REPOSITORY }}.git |
| 46 | + BRANCH: master |
| 47 | + FOLDER: build/hash-history |
| 48 | + SSH_PRIVATE_KEY: ${{ secrets.DEPLOYMENT_KEY }} |
0 commit comments