Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 15 additions & 30 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v2
- name: Docker login
uses: docker/login-action@v1
with:
repository: itering/actions
path: .github/actions
persist-credentials: false
ssh-key: '${{ secrets.ITERING_ACTIONS_DEPLOY_KEY }}'
username: ${{ secrets.QUAY_IO_BOT_USERNAME }}
password: ${{ secrets.QUAY_IO_BOT_PASSWORD }}
registry: quay.io

- uses: ./.github/actions/smart-vercel
name: Deploy to Vercel
id: smart-vercel
- uses: bhowell2/[email protected]
id: sha
with:
node_version: 14
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
script_install: npm i
script_build: npm run build
alias_domain: multisig-dev
value: ${{ github.event.pull_request.head.sha }}
length_from_start: 7

- uses: marocchino/sticky-pull-request-comment@v2
- uses: docker/build-push-action@v5
with:
append: true
message: ${{ steps.smart-vercel.outputs.PREVIEW_OUTPUT }}

# - name: Slack Notification
# uses: rtCamp/action-slack-notify@v2
# env:
# SLACK_CHANNEL: subscan-general
# SLACK_COLOR: ${{ job.status }}
# SLACK_ICON: https://avatars.githubusercontent.com/u/14985020?s=48&v=4
# SLACK_MESSAGE: '${{ steps.smart-vercel.outputs.PREVIEW_LINK }}'
# SLACK_TITLE: Preview
# SLACK_USERNAME: Vercel
# SLACK_WEBHOOK: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
context: .
file: Dockerfile
push: true
tags: quay.io/subscan-explorer/subscan-multisig:sha-${{
github.event.pull_request.number }}-${{ steps.sha.outputs.substring }}
41 changes: 16 additions & 25 deletions .github/workflows/deploy-prd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,23 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v2
- name: Docker login
uses: docker/login-action@v1
with:
repository: itering/actions
path: .github/actions
persist-credentials: false
ssh-key: '${{ secrets.ITERING_ACTIONS_DEPLOY_KEY }}'
username: ${{ secrets.QUAY_IO_BOT_USERNAME }}
password: ${{ secrets.QUAY_IO_BOT_PASSWORD }}
registry: quay.io

- uses: ./.github/actions/smart-vercel
name: Deploy to Vercel
id: smart-vercel
- uses: olegtarasov/[email protected]
id: tag-name
- uses: benjlevesque/[email protected]
id: short-sha
with:
node_version: 14
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
prod_mode: true
script_install: npm i
script_build: npm run build
length: 7

- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: subscan-multisig-notification
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://avatars.githubusercontent.com/u/14985020?s=48&v=4
SLACK_MESSAGE: '${{ steps.smart-vercel.outputs.PREVIEW_LINK }}'
SLACK_TITLE: Preview
SLACK_USERNAME: Vercel
SLACK_WEBHOOK: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
- uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
tags: quay.io/subscan-explorer/subscan-multisig:${{ env.GIT_TAG_NAME }}
39 changes: 14 additions & 25 deletions .github/workflows/deploy-stg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,21 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v2
- name: Docker login
uses: docker/login-action@v1
with:
repository: itering/actions
path: .github/actions
persist-credentials: false
ssh-key: '${{ secrets.ITERING_ACTIONS_DEPLOY_KEY }}'
username: ${{ secrets.QUAY_IO_BOT_USERNAME }}
password: ${{ secrets.QUAY_IO_BOT_PASSWORD }}
registry: quay.io

- uses: ./.github/actions/smart-vercel
name: Deploy to Vercel
id: smart-vercel
- uses: benjlevesque/[email protected]
id: short-sha
with:
node_version: 14
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
script_install: npm i
script_build: npm run build
alias_domain: multisig-staging
length: 7

- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: subscan-multisig-notification
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://avatars.githubusercontent.com/u/14985020?s=48&v=4
SLACK_MESSAGE: '${{ steps.smart-vercel.outputs.PREVIEW_LINK }}'
SLACK_TITLE: Preview
SLACK_USERNAME: Vercel
SLACK_WEBHOOK: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
- uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
tags: quay.io/subscan-explorer/subscan-multisig:sha-${{ steps.short-sha.outputs.sha }}-${{ github.run_number }}
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:14 as builder
WORKDIR /app

COPY package.json .
COPY package-lock.json .

RUN npm install

COPY . /app/

RUN npm run build

FROM nginx:stable-alpine

COPY --from=builder /app/build /usr/share/nginx/html

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
Loading