Merge pull request #1 from sengmitnick/feat/update-v3

feat: wrangler update to v3
pull/129/head
SengMitnick 11 months ago committed by GitHub
commit c3bc38c748
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,7 +14,7 @@ jobs:
uses: ./
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 468cce80dfb431f3a4058e6dc6031a44
accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
projectName: github-actions-example
directory: example
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

@ -13,9 +13,6 @@ inputs:
projectName:
description: "The name of the Pages project to upload to"
required: true
directory:
description: "The directory of static assets to upload"
required: true
gitHubToken:
description: "GitHub Token"
required: false
@ -28,7 +25,7 @@ inputs:
wranglerVersion:
description: "The version of Wrangler to use"
required: false
default: "2"
default: "3.57.2"
runs:
using: "node16"
main: "index.js"

@ -22065,7 +22065,6 @@ try {
const apiToken = (0, import_core.getInput)("apiToken", { required: true });
const accountId = (0, import_core.getInput)("accountId", { required: true });
const projectName = (0, import_core.getInput)("projectName", { required: true });
const directory = (0, import_core.getInput)("directory", { required: true });
const gitHubToken = (0, import_core.getInput)("gitHubToken", { required: false });
const branch = (0, import_core.getInput)("branch", { required: false });
const workingDirectory = (0, import_core.getInput)("workingDirectory", { required: false });
@ -22094,7 +22093,7 @@ try {
$ export CLOUDFLARE_ACCOUNT_ID="${accountId}"
}
$$ npx wrangler@${wranglerVersion} pages publish "${directory}" --project-name="${projectName}" --branch="${branch}"
$$ npx wrangler@${wranglerVersion} pages deploy
`;
const response = await (0, import_undici.fetch)(
`https://api.cloudflare.com/client/v4/accounts/${accountId}/pages/projects/${projectName}/deployments`,
@ -22152,7 +22151,7 @@ try {
}
await import_core.summary.addRaw(
`
# Deploying with Cloudflare Pages
# ${projectName} Deploying with Cloudflare Pages
| Name | Result |
| ----------------------- | - |

@ -1,6 +1,6 @@
{
"name": "pages-action",
"version": "1.5.0",
"version": "2.0.0",
"description": "Publish to Cloudflare Pages",
"main": "index.js",
"scripts": {

@ -12,7 +12,6 @@ try {
const apiToken = getInput("apiToken", { required: true });
const accountId = getInput("accountId", { required: true });
const projectName = getInput("projectName", { required: true });
const directory = getInput("directory", { required: true });
const gitHubToken = getInput("gitHubToken", { required: false });
const branch = getInput("branch", { required: false });
const workingDirectory = getInput("workingDirectory", { required: false });
@ -46,7 +45,7 @@ try {
$ export CLOUDFLARE_ACCOUNT_ID="${accountId}"
}
$$ npx wrangler@${wranglerVersion} pages publish "${directory}" --project-name="${projectName}" --branch="${branch}"
$$ npx wrangler@${wranglerVersion} pages deploy
`;
const response = await fetch(
@ -122,7 +121,7 @@ try {
await summary
.addRaw(
`
# Deploying with Cloudflare Pages
# ${projectName} Deploying with Cloudflare Pages
| Name | Result |
| ----------------------- | - |

@ -0,0 +1,7 @@
# Generated by Wrangler on Wed May 29 2024 11:47:23 GMT+0800 (中国标准时间)
name = "github-actions-example"
pages_build_output_dir = "example"
compatibility_date = "2024-05-29"
[env.production]
compatibility_date = "2024-05-29"
Loading…
Cancel
Save