-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Cloudflare deploy and scripts (#145)
- Loading branch information
1 parent
a3e7feb
commit 02c3fb4
Showing
3 changed files
with
1,404 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Publish to Cloudflare Pages | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
- name: Checkout 🛒 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install and Build 🔧 | ||
run: | | ||
npm ci | ||
npm run build | ||
publish: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy 🚀 | ||
uses: cloudflare/pages-action@v1.5 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: storychoices | ||
directory: dist | ||
branch: main # main branch is the production branch on Cloudflare Pages |
Oops, something went wrong.