Skip to content

Commit

Permalink
deploy with one yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
benhalverson committed Sep 4, 2024
1 parent 773e1ab commit 9e85c6c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 29 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/nodejs.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
name: Node.js CI
# name: Node.js CI

on:
push:
branches:
- main
pull_request:
branches:
- '*'
# on:
# push:
# branches:
# - main
# pull_request:
# branches:
# - '*'

jobs:
build:
runs-on: ubuntu-latest
# jobs:
# build:
# runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
# steps:
# - name: Checkout code
# uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
# - name: Use Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20
# cache: 'npm'

- name: Install Node.js dependencies
run: npm ci
# - name: Install Node.js dependencies
# run: npm ci

- name: Build Project
run: npm run build # Ensure this outputs to the `dist` directory
# - 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: build-artifact
path: dist
# - name: Upload Build Artifact
# uses: actions/upload-artifact@v3
# with:
# name: build-artifact
# path: dist
17 changes: 16 additions & 1 deletion .github/workflows/wrangler-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,23 @@ jobs:
# name: build-artifact
# path: dist

- name: Checkout code
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install Node.js dependencies
run: npm ci

- name: Install Node.js dependencies
run: npm run build

- name: Deploy to Cloudflare
run: npm run build && wrangler pages deploy ./dist
run: wrangler pages deploy ./dist
# - name: Deploy to Cloudflare
# uses: cloudflare/wrangler-action@v3
# with:
Expand Down

0 comments on commit 9e85c6c

Please sign in to comment.