Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyb3r-jak3/actions-cloudflare-pages
Github Action for deploying to Cloudflare pages when needed.
https://github.com/cyb3r-jak3/actions-cloudflare-pages
cloudflare-api github-actions typescript-action
Last synced: about 4 hours ago
JSON representation
Github Action for deploying to Cloudflare pages when needed.
- Host: GitHub
- URL: https://github.com/cyb3r-jak3/actions-cloudflare-pages
- Owner: Cyb3r-Jak3
- License: mpl-2.0
- Created: 2021-07-13T19:39:10.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-21T21:29:29.000Z (5 months ago)
- Last Synced: 2024-10-31T10:49:56.202Z (16 days ago)
- Topics: cloudflare-api, github-actions, typescript-action
- Language: TypeScript
- Homepage: https://github.com/marketplace/actions/cloudflare-page-deploy
- Size: 1.02 MB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloudflare Page Deploy
A Github Action that triggers a deployment with [Cloudflare Pages](https://pages.cloudflare.com/). Useful to have more control on when deployments are triggered with Cloudflare.
## Configuration
**All senstive information like account, email and global token should be stored with [encrypted secrets](https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets)**
### Account ID
Your account ID will be on the bottom right of the overview page for your domain.
![Image of blurred out account ID](.github/imgs/Cloudflare_Account_ID.png)
### Setting up Authentication
Currently, the only way to authicate with pages is using global authication.
1. Log in to Cloudflare and go to **My Profile** -> **API Tokens** -> **Global API Key**
2. You will need to enter your password to get the key.
3. Copy that key into a secret on Github and you will be able to use it.### Example workflow
```yaml
name: Deploy Site
on: pushjobs:
deploy:
runs-on: ubuntu-latest
steps:# Put steps here to build, and check your site.
- name: Cloudflare pages build
uses: Cyb3r-Jak3/actions-cloudflare-pages@
with:
account: ${{ secrets.CLOUDFLARE_ZONE }}
project: ${{ secrets.CLOUDFLARE_PROJECT }}
email: ${{ secrets.CLOUDFLARE_EMAIL }}
global_token: ${{ secrets.CLOUDFLARE_KEY }}
```## Keep up-to-date with GitHub Dependabot
Since [Dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot)
has [native GitHub Actions support](https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#package-ecosystem),
to enable it on your GitHub repo all you need to do is add the `.github/dependabot.yml` file:```yaml
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly
```