From d61f01ede58e3f4c6af76f6b5bea12815e4df01a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A2=E3=83=AC=E3=82=AF=E3=82=B5=E3=83=B3=E3=83=80?= =?UTF-8?q?=E3=83=BC=2Eeth?= Date: Tue, 20 Feb 2024 04:18:18 +0900 Subject: [PATCH] chore: debug cd --- .github/workflows/build.yml | 42 +++++++++---------------- .github/workflows/cloudflare-deploy.yml | 40 ----------------------- 2 files changed, 14 insertions(+), 68 deletions(-) delete mode 100644 .github/workflows/cloudflare-deploy.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3abb6f38..030b8ad4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: Build & Deploy on: push: @@ -21,33 +21,6 @@ jobs: yarn yarn build - - name: Copy files excluding .gitignore - run: | - mkdir preserved - rsync -av --progress . preserved --exclude-from='.gitignore' - - - name: Upload preserved directory - uses: actions/upload-artifact@v4 - with: - name: build-artifacts - path: preserved - -# name: Deploy to Cloudflare Pages - -# on: - # workflow_dispatch: - # workflow_run: - # workflows: ["Build"] # Needs to build first before we can deploy. - # types: - # - completed - -# jobs: - # deploy-to-cloudflare: - # name: Deploy to Cloudflare Pages - # runs-on: ubuntu-22.04 - # permissions: - # contents: read - # steps: - name: Check Cloudflare API Token id: check_token run: | @@ -59,6 +32,19 @@ jobs: fi shell: bash + # - name: Copy files excluding .gitignore + # if: steps.check_token.outputs.skip != 'true' + # run: | + # mkdir preserved + # rsync -av --progress . preserved --exclude-from='.gitignore' + + # - name: Upload preserved directory + # if: steps.check_token.outputs.skip != 'true' + # uses: actions/upload-artifact@v4 + # with: + # name: build-artifacts + # path: preserved + - name: Deploy to Cloudflare if: steps.check_token.outputs.skip != 'true' uses: ubiquity/cloudflare-deploy-action@main diff --git a/.github/workflows/cloudflare-deploy.yml b/.github/workflows/cloudflare-deploy.yml deleted file mode 100644 index 72a5e246..00000000 --- a/.github/workflows/cloudflare-deploy.yml +++ /dev/null @@ -1,40 +0,0 @@ -# name: Deploy to Cloudflare Pages - -# on: -# workflow_dispatch: -# # workflow_run: -# # workflows: ["Build"] # Needs to build first before we can deploy. -# # types: -# # - completed - -# jobs: -# deploy-to-cloudflare: -# name: Deploy to Cloudflare Pages -# runs-on: ubuntu-22.04 -# permissions: -# contents: read -# steps: -# - name: Check Cloudflare API Token -# id: check_token -# run: | -# if [[ -z "${{ secrets.CLOUDFLARE_API_TOKEN }}" ]]; then -# echo "Cloudflare API token is not set. Skipping deployment." -# echo "::set-output name=skip::true" -# else -# echo "::set-output name=skip::false" -# fi -# shell: bash - -# - name: Deploy to Cloudflare -# if: steps.check_token.outputs.skip != 'true' -# uses: ubiquity/cloudflare-deploy-action@main -# with: -# cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }} -# repository: ${{ github.repository }} -# production_branch: ${{ github.event.repository.default_branch }} -# output_directory: "dist" -# current_branch: ${{ github.ref_name }} -# # env: -# # Add any environment variables you need to pass along here -# # SUPABASE_URL: ${{ secrets.SUPABASE_URL }} -# # SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}