Skip to content

Commit

Permalink
Merge branch 'dev' into chore/migrate-client-to-vite
Browse files Browse the repository at this point in the history
  • Loading branch information
msarcev committed Nov 24, 2023
2 parents e369e1d + deb3ffd commit c984b1e
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 2 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/docker-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Deploy Workflow

on:
workflow_dispatch:
inputs:
deployment:
type: boolean
description: 'Deploy after build?'
required: false
default: false
environment:
type: choice
description: 'Select the environment to deploy to'
options:
- staging
- prod
- shimmer-staging
- shimmer-prod
required: false
default: staging

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.IOTALEDGER_DOCKER_USERNAME }}
password: ${{ secrets.IOTALEDGER_DOCKER_PASSWORD }}

#- name: Get the version
# id: get_version
# run: echo "VERSION=$(git describe --tags)" >> $GITHUB_ENV

- name: Get the short commit hash
run: |
COMMIT_HASH=$(git rev-parse --short HEAD)
echo "VERSION=$COMMIT_HASH" >> $GITHUB_ENV
- name: Set up Environment Variable
run: echo "DEPLOY_ENV=${{ github.event.inputs.environment }}" >> $GITHUB_ENV

- name: Build and push API Docker image
uses: docker/build-push-action@v2
with:
context: ./api
file: ./api/Dockerfile
push: true
tags: iotaledger/explorer-api:${{ env.VERSION }}
no-cache: true

- name: Build and push Client Docker image
uses: docker/build-push-action@v2
with:
context: ./client
file: ./client/Dockerfile
push: true
tags: iotaledger/explorer-client:${{ env.VERSION }}
no-cache: true

- name: Add SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.UPDATER_SSH_PRIVATE_KEY }}

- name: Deploy to Server
if: ${{ github.event.inputs.deployment }}
run: |
ssh -o StrictHostKeyChecking=no updater@${{ secrets.EXPLORER_GATEWAY }} "${{ env.DEPLOY_ENV }} ${{ env.VERSION }}"
2 changes: 1 addition & 1 deletion client/src/app/components/chrysalis/ReceiptPayload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ReceiptPayload extends Component<ReceiptPayloadProps, ReceiptPayloadState>
*/
public render(): ReactNode {
return (
<div className="indexation-payload">
<div className="indexation-payload card">
<div className="card--header">
<h2>Receipt Payload</h2>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ReceiptPayload extends Component<ReceiptPayloadProps, ReceiptPayloadState>
const tokenInfo: INodeInfoBaseToken = this.context.tokenInfo;

return (
<div className="indexation-payload">
<div className="indexation-payload card">
<div className="card--header">
<h2>Receipt Payload</h2>
</div>
Expand Down

0 comments on commit c984b1e

Please sign in to comment.