From 026f91a8dad7dad04bbf20394133a2875122f904 Mon Sep 17 00:00:00 2001 From: haimlevy2006 Date: Wed, 3 Jul 2024 22:11:02 +0300 Subject: [PATCH] Disable Preview Docs on PR --- .github/workflows/create-preview-on-pr.yaml | 113 ++++++++++---------- 1 file changed, 56 insertions(+), 57 deletions(-) diff --git a/.github/workflows/create-preview-on-pr.yaml b/.github/workflows/create-preview-on-pr.yaml index 286490b2dc..95daaf2938 100644 --- a/.github/workflows/create-preview-on-pr.yaml +++ b/.github/workflows/create-preview-on-pr.yaml @@ -1,66 +1,65 @@ -name: Create Preview for PRs +# name: Create Preview for PRs -on: - pull_request: - types: - - opened - - reopened - - synchronize - - closed - branches: - - master - - v*.* +# on: +# pull_request: +# types: +# - opened +# - reopened +# - synchronize +# - closed +# branches: +# - master +# - v*.* -env: - PR_NUMBER: ${{ github.event.number }} +# env: +# PR_NUMBER: ${{ github.event.number }} -jobs: - comment-on-pr: - runs-on: ubuntu-latest - steps: - - name: Comment on PR - uses: hasura/comment-progress@v2.2.0 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - repository: ${{ github.repository }} - number: ${{ github.event.number }} - id: deploy-preview - message: "Starting deployment of preview ā³..." +# jobs: +# comment-on-pr: +# runs-on: ubuntu-latest +# steps: +# - name: Comment on PR +# uses: hasura/comment-progress@v2.2.0 +# with: +# github-token: ${{ secrets.GITHUB_TOKEN }} +# repository: ${{ github.repository }} +# number: ${{ github.event.number }} +# id: deploy-preview +# message: "Starting deployment of preview ā³..." - create-preview: - name: create preview - runs-on: ubuntu-latest - steps: - - name: checkout latest - uses: actions/checkout@v4 - with: - fetch-depth: 0 +# create-preview: +# name: create preview +# runs-on: ubuntu-latest +# steps: +# - name: checkout latest +# uses: actions/checkout@v4 +# with: +# fetch-depth: 0 - - name: setup python - uses: actions/setup-python@v5 - with: - python-version: '3.9' - cache: 'pip' # caching pip dependencies +# - name: setup python +# uses: actions/setup-python@v5 +# with: +# python-version: '3.9' +# cache: 'pip' # caching pip dependencies - - name: install dependencies - run: | - pip3 install -r requirements.txt +# - name: install dependencies +# run: | +# pip3 install -r requirements.txt - - name: Configure Git User - run: | - git config user.name "circleci-runai" - git config user.email "circleci-runai@run.ai" +# - name: Configure Git User +# run: | +# git config user.name "circleci-runai" +# git config user.email "circleci-runai@run.ai" - - name: building preview - run: | - mike deploy ${{ env.PR_NUMBER }} ${{ env.PR_NUMBER }}-alias -t ${{ env.PR_NUMBER }} --prop-set hidden=true --push +# - name: building preview +# run: | +# mike deploy ${{ env.PR_NUMBER }} ${{ env.PR_NUMBER }}-alias -t ${{ env.PR_NUMBER }} --prop-set hidden=true --push - - name: Update comment - uses: hasura/comment-progress@v2.2.0 - if: github.ref != 'refs/heads/main' - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - repository: ${{ github.repository }} - number: ${{ github.event.number }} - id: deploy-preview - message: "A preview of ${{ github.event.after }} is uploaded and can be seen here:\n\n āœØ https://docs.run.ai/${{ env.PR_NUMBER }} āœØ\n\nšŸš€ Happy reviewing! šŸš€" \ No newline at end of file +# - name: Update comment +# uses: hasura/comment-progress@v2.2.0 +# with: +# github-token: ${{ secrets.GITHUB_TOKEN }} +# repository: ${{ github.repository }} +# number: ${{ github.event.number }} +# id: deploy-preview +# message: "A preview of ${{ github.event.after }} is uploaded and can be seen here:\n\n āœØ https://docs.run.ai/${{ env.PR_NUMBER }} āœØ\n\nšŸš€ Happy reviewing! šŸš€" \ No newline at end of file