From 069f934ec6fe0d5ad653d23c9333e3ad7667756c Mon Sep 17 00:00:00 2001 From: rndquu Date: Mon, 18 Mar 2024 19:22:20 +0300 Subject: [PATCH] ci: remove deploy workflow --- .github/workflows/deploy.yml | 52 ------------------------------------ 1 file changed, 52 deletions(-) delete mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 1c516c9..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Automatic Cloudflare Deploy - -on: - workflow_call: - -jobs: - deploy-to-cloudflare: - name: Automatic Cloudflare Deploy - runs-on: ubuntu-22.04 - steps: - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20.10.0 - - - name: Find associated pull request - id: pr - uses: actions/github-script@v7 - with: - script: | - const response = await github.rest.search.issuesAndPullRequests({ - q: 'repo:${{ github.repository }} is:pr sha:${{ github.event.workflow_run.head_sha }}', - per_page: 1, - }) - const items = response.data.items - if (items.length < 1) { - console.error('No PRs found') - return - } - const pullRequestNumber = items[0].number - console.info("Pull request number is", pullRequestNumber) - return pullRequestNumber - - - name: Download build artifact - uses: dawidd6/action-download-artifact@v3 - with: - name: static - path: static - run_id: ${{ github.event.workflow_run.id }} - - - name: Deploy to Cloudflare - if: ${{ github.event.workflow_run.conclusion == 'success' }} - uses: ubiquity/cloudflare-deploy-action@main - with: - repository: ${{ github.repository }} - production_branch: ${{ github.event.repository.default_branch }} - output_directory: "static" - current_branch: ${{ github.event.workflow_run.head_branch }} - pull_request_number: ${{ steps.pr.outputs.result }} - cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }} - commit_sha: ${{ github.event.workflow_run.head_sha }}