Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
ci: upload & download artifacts between jobs (#6511)
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-hosseini-deriv authored Jan 12, 2024
1 parent a20e4b4 commit e708de2
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
- run: npm run format
- run: npm run test
- run: npm run build
- run: echo $GIT_TAG_NAME > public/version.txt

- name: Remove Storybook
uses: JesseTG/[email protected]
Expand All @@ -61,6 +60,8 @@ jobs:

- uses: olegtarasov/[email protected]
id: tagName
- run: echo $GIT_TAG_NAME > public/version.txt

# For using same tag for staging and production we need to uncomment these two below lines:
# with:
# tagRegex: "production(.*)"
Expand All @@ -73,7 +74,11 @@ jobs:

- name: Cloudflare production link ✨
run: echo "New website - http://cf-pages-deriv-com.deriv.com"

- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: production
path: public
- name: Slack Notification 📣
uses: 8398a7/action-slack@v3
with:
Expand All @@ -92,9 +97,22 @@ jobs:
if: always()

build_and_publish_to_docker_k8s:
runs-on: Runner_8cores_Deriv-app
runs-on: Runner_16cores
environment: production
steps:
- name: Checkout 🛎️
uses: actions/[email protected]
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: production
path: public
- name: Set version env variable
run: echo "GIT_TAG_NAME=$(cat public/version.txt)" >> $GITHUB_ENV
- name: Building docker image 🐳
run: docker build -t ${{ secrets.DOCKERHUB_ORGANISATION }}/deriv-com:latest -t ${{ secrets.DOCKERHUB_ORGANISATION }}/deriv-com:$GIT_TAG_NAME .

Expand Down Expand Up @@ -140,4 +158,4 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
if: ${{ steps.build_and_push_docker_image.outcome != 'success' }}
if: failure()

1 comment on commit e708de2

@vercel
Copy link

@vercel vercel bot commented on e708de2 Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-com – ./

deriv-com-git-master.binary.sx
deriv-com.binary.sx

Please sign in to comment.