diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 5b136b9ff..000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,49 +0,0 @@ -# Name of workflow as seen in Github actions tab -name: dev-build-and-deploy -# Run workflow only on push to dev branch -on: - push: - branches: - - main - workflow_dispatch: # Put here!! -jobs: - # To build the project - deploy_to_s3: - name: Deploy to S3 - runs-on: ubuntu-latest - defaults: - run: - working-directory: docs - steps: - - name: Checking out code - uses: actions/checkout@v3 - - - name: Installing Node.js - uses: actions/setup-node@v3 - with: - node-version: "16" - - - name: Installing dependencies - run: yarn install - - - name: Building project - run: CI=false yarn build - - - name: Deploy to S3 - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read - env: - AWS_S3_BUCKET: "docs.zelthy.com" - AWS_ACCESS_KEY_ID: ${{secrets.ZELTHYSTATIC_S3_AWS_KEY_ID}} - AWS_SECRET_ACCESS_KEY: ${{secrets.ZELTHYSTATIC_S3_AWS_KEY}} - AWS_REGION: "ap-south-1" - SOURCE_DIR: "docs/build/" - DEST_DIR: "" - - - name: Notify on z-deployment_notifs slack channel - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.Z_DEPOY_NOTIFS_SLACK_WEBHOOK_URL }} - SLACK_TITLE: New deployment in documentation environment of ${{ github.event.repository.name }} - SLACK_CHANNEL: "z-deployment-notifs" diff --git a/.github/workflows/sync-docs-to-docs-hub.yml b/.github/workflows/sync-docs-to-docs-hub.yml index c5768355b..7d3c332db 100644 --- a/.github/workflows/sync-docs-to-docs-hub.yml +++ b/.github/workflows/sync-docs-to-docs-hub.yml @@ -9,27 +9,12 @@ on: jobs: sync: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Extract branch name - shell: bash - run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT - id: extract_branch - - - name: Push to zelthy3-docs-hub repository - uses: cpina/github-action-push-to-another-repository@main - env: - API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - source-directory: "docs" - target-directory: "all_docs/zelthy3" - destination-github-username: "Healthlane-Technologies" - destination-repository-name: "zelthy3-docs-hub" - commit-message: "Sync Zelthy3 docs" - user-email: ravi@zelthy.com - target-branch: staging - \ No newline at end of file + uses: Healthlane-Technologies/zelthy-ci-cd-workflows/.github/workflows/sync-docs-to-docs-hub.yml@v5 + with: + source-directory: "docs" + target-directory: "all_docs/zelthy3" + destination-github-username: "Healthlane-Technologies" + destination-repository-name: "zelthy3-docs-hub" + commit-message: "Sync zcore package docs" + target-branch: staging + secrets: inherit