Skip to content

Commit

Permalink
trying again
Browse files Browse the repository at this point in the history
  • Loading branch information
benhalverson committed Sep 4, 2024
1 parent ef170ad commit 0473f9f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/nodejs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
pull_request:
branches:
- '*'
- '*'

jobs:
build:
Expand All @@ -25,5 +25,14 @@ jobs:
- name: Install Node.js dependencies
run: npm ci

- name: Build Project
run: npm run build # Ensure this outputs to the `dist` directory

- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: dist
path: dist

# - name: Run tests
# run: npm test
23 changes: 16 additions & 7 deletions .github/workflows/wrangler-action.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
name: Deploy
name: Deploy to Cloudflare

on:
push:
branches:
- main
workflow_run:
workflows: ["Node.js CI"]
types:
- completed

jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy

steps:
- uses: actions/checkout@v4
- name: Deploy
- name: Download Build Artifact
uses: actions/download-artifact@v3
with:
name: dist
path: dist

- name: Deploy to Cloudflare
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
env:
WORKING_DIRECTORY: './dist'

0 comments on commit 0473f9f

Please sign in to comment.