From fd9a8e59ddddb1c4d83e923117cbfb1a0966b286 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: Sun, 25 Feb 2024 16:58:05 +0900 Subject: [PATCH] fix: continuous deploys --- .github/workflows/build.yml | 23 +++++++++------------- .github/workflows/conventional-commits.yml | 2 +- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 133b29f3..84674e1e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,20 +5,18 @@ on: pull_request: workflow_dispatch: -env: - SUPABASE_URL: ${{ secrets.SUPABASE_URL }} - SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} +permissions: + contents: read jobs: build: runs-on: ubuntu-22.04 - permissions: - contents: read + steps: - name: Check out repository uses: actions/checkout@v4 - with: - submodules: "recursive" # Ensures submodules are checked out + # with: + # submodules: "recursive" # Ensures submodules are checked out - name: Set up Node.js uses: actions/setup-node@v4 @@ -29,19 +27,16 @@ jobs: run: | yarn yarn build - echo -n $(echo "${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}" | cut -c1-7) > static/commit.txt + env: # Set environment variables for the build + SUPABASE_URL: "https://wfzpewmlyiozupulbuur.supabase.co" + SUPABASE_ANON_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6IndmenBld21seWlvenVwdWxidXVyIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTU2NzQzMzksImV4cCI6MjAxMTI1MDMzOX0.SKIL3Q0NOBaMehH0ekFspwgcu3afp3Dl9EDzPqs1nKs" - name: Deploy to Cloudflare - if: env.skip != 'true' uses: ubiquity/cloudflare-deploy-action@main with: - cloudflare_api_token: JWo5dPsoyohH5PRu89-RktjCvRN0-ODC6CC9ZBqF # Specifically scoped for public contributors to automatically deploy to our team Cloudflare account repository: ${{ github.repository }} production_branch: ${{ github.event.repository.default_branch }} output_directory: "static" current_branch: ${{ github.ref_name }} pull_request_number: ${{ github.event.pull_request.number }} - commit_sha: ${{ github.sha }} - # Add any environment variables you need to pass along here - # SUPABASE_URL: ${{ secrets.SUPABASE_URL }} - # SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} + commit_sha: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml index 6b3066e5..8d175682 100644 --- a/.github/workflows/conventional-commits.yml +++ b/.github/workflows/conventional-commits.yml @@ -8,5 +8,5 @@ jobs: name: Conventional Commits runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ubiquity/action-conventional-commits@master