From 96ba86d2c7c252f8f75c214933ee2ae26b8a14f3 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Wed, 5 Jan 2022 16:26:15 +0100 Subject: [PATCH] chore: remove publish action (#6100) --- .github/workflows/publish.yml | 65 ----------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 2f85226d..00000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Netlify CMS Publish - -on: - repository_dispatch: - -jobs: - check-permission: - runs-on: ubuntu-latest - env: - SENDER: ${{ github.event.sender.login }} - ALLOWED_LOGINS_TO_PUBLISH: ${{ secrets.ALLOWED_LOGINS_TO_PUBLISH }} - steps: - - name: 'Check Permission To Publish' - run: | - if [[ "$SENDER" =~ ^$ALLOWED_LOGINS_TO_PUBLISH$ ]]; then - echo "$SENDER is allowed to publish" - exit 0 - else - echo "$SENDER is not allowed to publish" - exit 1 - fi - publish: - needs: check-permission - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - token: ${{ secrets.GIT_TOKEN }} - - name: Use Node.js - uses: actions/setup-node@v2 - with: - node-version: '*' - check-latest: true - - uses: actions/cache@v2 - with: - path: ~/.cache/yarn - key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: update yarn to latest version - run: | - sudo apt update && sudo apt install yarn - - - name: Install Dependencies - run: yarn install --frozen-lockfile - - - name: Switch to master branch - run: git checkout master - - - name: Setup Git User - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - - - name: Publish Netlify CMS - uses: erezrokah/2fa-with-slack-action@v1 - env: - NPM_TOKEN: ${{secrets.NPM_TOKEN}} - SLACK_TOKEN: ${{secrets.SLACK_TOKEN}} - CHANNEL_ID: ${{secrets.CHANNEL_ID}} - PUBLISH_COMMAND: "yarn\npublish:ci" - CODE_PATTERN: 'Enter OTP' - # 40 minutes for the entire command, 20 minutes for waiting for 2FA - TIMEOUT: '2400000' - REVERT_COMMAND: './scripts/revert_publish.sh'