Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: cloudflare/wrangler-action に変更 #182

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
deploy:
uses: ./.github/workflows/wc-deploy-cloudflare-pages.yml
with:
branch: 'develop'
project-name: 'nito-docs'
branch: 'staging'
gh-app-id: ${{ vars.BOT_APP_ID }}
pr-comment-enabled: false
secrets:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
needs: changed
if: needs.changed.outputs.docs == 'true'
with:
project-name: 'nito-docs'
branch: 'preview'
gh-app-id: ${{ vars.BOT_APP_ID }}
pr-comment-enabled: true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
deploy:
uses: ./.github/workflows/wc-deploy-cloudflare-pages.yml
with:
project-name: 'nito-docs'
branch: 'main'
gh-app-id: ${{ vars.BOT_APP_ID }}
pr-comment-enabled: false
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/wc-deploy-cloudflare-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: "Deploy Cloudflare Pages"
on:
workflow_call:
inputs:
project-name:
required: true
type: string
branch:
required: true
type: string
Expand Down Expand Up @@ -53,15 +56,12 @@ jobs:

# https://github.com/marketplace/actions/cloudflare-pages-github-action
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca # v1.5.0
uses: cloudflare/wrangler-action@f84a562284fc78278ff9052435d9526f9c718361 # v3.7.0
id: cloudflare-pages
with:
apiToken: ${{ secrets.cloudflare-api-token }}
accountId: ${{ secrets.cloudflare-account-id }}
projectName: nito-docs
directory: ./dist
gitHubToken: ${{ steps.app-token.outputs.token }}
branch: ${{ inputs.branch }}
command: pages deploy ./dist --project-name=${{ inputs.project-name }} --branch=${{ inputs.branch }}

# https://github.com/marketplace/actions/lighthouse-check
- name: Lighthouse
Expand All @@ -70,4 +70,4 @@ jobs:
gitHubAccessToken: ${{ steps.app-token.outputs.token }}
locale: ja
prCommentEnabled: ${{ inputs.pr-comment-enabled }}
urls: ${{ steps.cloudflare-pages.outputs.url }}
urls: ${{ steps.cloudflare-pages.outputs.deployment-url }}
Loading