From 1f80af63af8b2c1d97b125fd64b0a248e8d4ded0 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 07:02:49 +0900 Subject: [PATCH] fix: whitespace --- .github/workflows/build.yml | 88 ++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 50 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc99613..3f41627 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,57 +10,45 @@ jobs: permissions: contents: read steps: - - name: Check out repository - uses: actions/checkout@v4 + - name: Check out repository + uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20.10.0 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20.10.0 - - name: Build - run: | - yarn - yarn build + - name: Build + run: | + yarn + yarn build - - 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: 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: 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 - 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 }} - pull_request_number: ${{ github.event.pull_request.number }} - commit_sha: ${{ github.sha }} - - env: - TEST_TEMPLATE: ${{ secrets.TEST_TEMPLATE }} - TEST_CLOUDFLARE_DEPLOY: ${{ secrets.TEST_CLOUDFLARE_DEPLOY }} - # env: - # Add any environment variables you need to pass along here - # SUPABASE_URL: ${{ secrets.SUPABASE_URL }} - # SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} + - 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 }} + pull_request_number: ${{ github.event.pull_request.number }} + commit_sha: ${{ github.sha }} + env: + TEST_TEMPLATE: ${{ secrets.TEST_TEMPLATE }} + TEST_CLOUDFLARE_DEPLOY: ${{ secrets.TEST_CLOUDFLARE_DEPLOY }} + # env: + # Add any environment variables you need to pass along here + # SUPABASE_URL: ${{ secrets.SUPABASE_URL }} + # SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}