{"id":16377711,"url":"https://github.com/walshydev/cf-pages-await","last_synced_at":"2025-03-23T00:06:25.069Z","repository":{"id":39898947,"uuid":"421393670","full_name":"WalshyDev/cf-pages-await","owner":"WalshyDev","description":"Wait for your Cloudflare Pages builds to finish!","archived":false,"fork":false,"pushed_at":"2024-09-20T19:07:27.000Z","size":461,"stargazers_count":75,"open_issues_count":7,"forks_count":16,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T01:39:15.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WalshyDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"WalshyDev","custom":"https://paypal.me/walshblob"}},"created_at":"2021-10-26T11:18:52.000Z","updated_at":"2025-03-18T23:53:48.000Z","dependencies_parsed_at":"2024-03-16T16:05:54.218Z","dependency_job_id":"950c4c1b-41a0-4442-86bc-3d088bd6fb83","html_url":"https://github.com/WalshyDev/cf-pages-await","commit_stats":{"total_commits":21,"total_committers":4,"mean_commits":5.25,"dds":0.5714285714285714,"last_synced_commit":"cb445e710009cdda1adfbb834706d55c14423e10"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalshyDev%2Fcf-pages-await","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalshyDev%2Fcf-pages-await/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalshyDev%2Fcf-pages-await/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalshyDev%2Fcf-pages-await/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WalshyDev","download_url":"https://codeload.github.com/WalshyDev/cf-pages-await/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245036147,"owners_count":20550661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T03:43:50.076Z","updated_at":"2025-03-23T00:06:25.025Z","avatar_url":"https://github.com/WalshyDev.png","language":"TypeScript","funding_links":["https://github.com/sponsors/WalshyDev","https://paypal.me/walshblob"],"categories":[],"sub_categories":[],"readme":"# CF Pages Await\n\nWait for a Cloudflare Pages build to finish so you can do actions like purge cache, update Workers, etc.\n\n## Usage\n```yml\nname: Deploy\non: push\njobs:\n  build:\n    runs-on: ubuntu-latest\n    # Allow GITHUB_TOKEN to write deployments for my action (https://docs.github.com/en/actions/security-guides/automatic-token-authentication)\n    permissions:\n      contents: read\n      deployments: write\n    steps:\n    - name: Await CF Pages\n      uses: WalshyDev/cf-pages-await@v1\n      with:\n        # Uncomment these two lines if you wish to use the Global API Key (Not recommended!)\n        # accountEmail: ${{ secrets.CF_ACCOUNT_EMAIL  }}\n        # apiKey: ${{ secrets.CF_API_KEY  }}\n\n        # Use an API token (Recommended!)\n        apiToken: ${{ secrets.CF_API_TOKEN }}\n\n        accountId: '4e599df4216133509abaac54b109a647'\n        project: 'example-pages-project'\n        # Add this if you want GitHub Deployments (see below)\n        githubToken: ${{ secrets.GITHUB_TOKEN }}\n        # Add this if you want to wait for a deployment triggered by a specfied commit\n        commitHash: ${{ steps.push-changes.outputs.commit-hash }}\n```\n\n### Example\n```yml\nname: Deploy\non: push\njobs:\n  build:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      deployments: write\n    steps:\n    - uses: actions/checkout@v2\n    - name: Wait for CF Pages\n      id: cf-pages\n      uses: WalshyDev/cf-pages-await@v1\n      with:\n        apiToken: ${{ secrets.CF_API_TOKEN  }}\n        accountId: '4e599df4216133509abaac54b109a647'\n        project: 'test'\n        # Add this if you want GitHub Deployments (see below)\n        githubToken: ${{ secrets.GITHUB_TOKEN }}\n    - run: |\n        curl -X \\\n          -H \"Authorization: ${{ secrets.CF_API_TOKEN }}\" \\\n          -H \"Content-Type: application/json\" \\\n          --data '{\"purge_everything\":true}' \\\n          https://api.cloudflare.com/client/v4/zones/8d0c8239f88f98a8cb82ec7bb29b8556/purge_cache\n```\n\n## Outputs\n* `id`          - Deployment ID, example: `50ff553c-da5d-4846-8188-25ae82a3bb7d`\n* `environment` - Environment for this deployment, either `production` or `preview`\n* `url`         - URL for this deployment\n* `alias`       - Alias URL (Will be the branch URL such as `fix-issue.project.pages.dev` or be the deployment URL)\n* `success`     - If the deployment was successful\n\n## GitHub Deployments\nGitHub Deployments will show if the deployment was successful or failed right inside GitHub! You can easily see the status, view the website (exact deployment) and see the logs.\n\n\u003e **Note**: You need to add the `githubToken` input in order for deployments to work!\n\n### Overview\n![Successful production deployment](https://user-images.githubusercontent.com/8492901/149387681-25ec860d-0c8e-4075-8ab0-4d289b86127b.png)\n\n### Pull Requests\n**In Progress**\n![In progress deployment in PR](https://user-images.githubusercontent.com/8492901/149388796-6bbd4ae9-b7b3-4d06-80c5-c18b3737f51f.png)\n\n**Successful**\n![Successful deployment in PR](https://user-images.githubusercontent.com/8492901/149388892-14a7ea25-6865-4d52-b403-30e8cec449d2.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalshydev%2Fcf-pages-await","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwalshydev%2Fcf-pages-await","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalshydev%2Fcf-pages-await/lists"}