Skip to content

Merge pull request #576 from ali-hosseini-deriv/ako/add-github-actions #4

Merge pull request #576 from ali-hosseini-deriv/ako/add-github-actions

Merge pull request #576 from ali-hosseini-deriv/ako/add-github-actions #4

name: DSmartTrader Staging Release
on:
push:
branches:
- master
jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
uses: "./.github/actions/npm_install"
- name: Build Staging
uses: "./.github/actions/build"
with:
target: staging
- name: Build Translations
uses: "./.github/actions/build"
with:
target: translations
- uses: "./.github/actions/versioning"
with:
target_branch: production
- name: "Run Tests"
run: npm run test
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
publish_cloudflare_production:
name: Publish to Cloudflare Pages Production
runs-on: ubuntu-latest
needs: [build_and_test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- uses: actions/[email protected]
with:
path: dist
- uses: "./.github/actions/publish_to_pages_production"
with:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}