Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

August 2024 Specials

· 4 min read
Keith Tan
Web Dev · System Admin

The August 2024 Specials. New stuff coming out this August. Learn more.

media

Welcome to the August 2024 update! This month, we’re focusing on extending React components and improving the deployment workflow to boost efficiency and productivity.

Highlights

References

Changes

New Docs

New Pages

/404/?docusaurus-theme=dark

Deployments

CLI

package.json
  "scripts": {
// ...
"start:fast": "npm run docusaurus start -- --host 0.0.0.0 --no-open",
"serve:fast": "docusaurus build && docusaurus serve --host 0.0.0.0 --no-open",
"build:local": "docusaurus build && docusaurus serve",
"deploy:cf": "npm run build && wrangler pages deploy ./build",
"rm:pckg": "pwsh -Command \"Remove-Item -Path 'node_modules', 'yarn.lock', 'package-lock.json' -Recurse -Force -ErrorAction SilentlyContinue\""
},

Actions

.github/workflows/pages-deployment.yml
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build
run: |
cd website
npm install && npm run build

- name: Publish
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: <CLOUDFLARE_PROJECT_NAME>
directory: website/build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

React <Components/>

Docusaurus supports MDX out of the box, enabling you to embed JSX directly in your Markdown files and render them as React components. Apart from the features in the homepage, check out this custom cards.

Deploying Cloudflare Pages with Wrangler and Actions

Cloudflare Pages has become a popular choice for deploying fast and secure static sites, and this month we’re excited to introduce new features that will simplify your deployment process.

Wrangler Integration

Wrangler, the command-line tool for Cloudflare Workers, now supports seamless integration with Cloudflare Pages. Learn more.

You can use Wrangler to manage your deployment configurations, automate builds, and handle advanced deployment scenarios with ease.

GitHub Actions for Deployment

To make continuous deployment even more accessible, we’ve integrated GitHub Actions with Cloudflare Pages.

.github/workflows/pages-deployment.yml
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build
run: |
cd website
npm install && npm run build

- name: Publish
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: <CLOUDFLARE_PROJECT_NAME>
directory: website/build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

What’s Next?

We’re constantly working to enhance our tools and resources to support your development journey. These August 2024 updates are just the beginning, and we’re excited to see how you’ll leverage these new features and improvements.

Stay tuned for more updates, and as always, we’d love to hear your feedback. Happy coding, and here’s to making August a month of innovation and progress!