Skip to content

Commit

Permalink
Add Cloudflare Pages deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-flinn committed Aug 19, 2023
1 parent 5ab5450 commit 428a4c3
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build-n-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ jobs:
with:
path: frontend/build

- name: Upload Zipped Site Artifact
uses: actions/[email protected]
with:
name: cf-site
path: frontend/build


deploy-frontend:
name: Deploy Frontend
Expand All @@ -95,6 +101,41 @@ jobs:
uses: actions/[email protected]


deploy-frontend-new:
name: Deploy Frontend (Cloudflare Pages)
if: ${{ needs.setup.outputs.frontend-changed == 'true' || inputs.deploy-frontend }}
runs-on: ubuntu-latest
needs:
- setup
- build-frontend
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: cloudflare-pages
url: https://blog-frontend.flinnlab.workers.dev
steps:
- uses: actions/[email protected]
with:
name: cf-site
path: frontend/build

- name: Test path
run: ls -alh frontend/build

- name: Deploy to CloudFlare Pages
id: deployment
uses: cloudflare/[email protected]
with:
workingDirectory: frontend
apiToken: ${{ secrets.CF_API_KEY }}
accountId: ${{ secrets.CF_ACCOUNT }}
projectName: blog-frontend
directory: build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main


build-n-deploy-data:
name: Build Data
if: ${{ needs.setup.outputs.data-changed == 'true' || inputs.update-data }}
Expand Down

0 comments on commit 428a4c3

Please sign in to comment.