Skip to content

Commit

Permalink
fix: upgrade github workflows for better dx
Browse files Browse the repository at this point in the history
  • Loading branch information
btkostner committed Feb 3, 2024
1 parent 896c366 commit 414aaef
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 37 deletions.
57 changes: 30 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,24 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install (Node)
uses: actions/setup-node@v2
- id: node
name: Install (Node)
uses: actions/setup-node@v4
with:
cache: npm
node-version: "16.13.0"
node-version-file: .tool-versions

- name: Cache
id: cache
- id: cache
name: Cache
uses: actions/cache@v2
with:
key: ${{ steps.node.outputs.node-version }}-${{ hashFiles('package-lock.json') }}
path: node_modules
key: 16.13.0-${{ hashFiles('package-lock.json') }}

- name: Install (Npm)
if: steps.cache.outputs.cache-hit != 'true'
- if: steps.cache.outputs.cache-hit != 'true'
name: Install (Npm)
run: npm ci --prefer-offline --no-audit --no-fund

- name: Build
Expand All @@ -52,23 +53,24 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install (Node)
uses: actions/setup-node@v2
- id: node
name: Install (Node)
uses: actions/setup-node@v4
with:
cache: npm
node-version: "16.13.0"
node-version-file: .tool-versions

- name: Cache
id: cache
- id: cache
name: Cache
uses: actions/cache@v2
with:
key: ${{ steps.node.outputs.node-version }}-${{ hashFiles('package-lock.json') }}
path: node_modules
key: 16.13.0-${{ hashFiles('package-lock.json') }}

- name: Install (Npm)
if: steps.cache.outputs.cache-hit != 'true'
- if: steps.cache.outputs.cache-hit != 'true'
name: Install (Npm)
run: npm ci --prefer-offline --no-audit --no-fund

- name: Format
Expand All @@ -80,23 +82,24 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install (Node)
uses: actions/setup-node@v2
- id: node
name: Install (Node)
uses: actions/setup-node@v4
with:
cache: npm
node-version: "16.13.0"
node-version-file: .tool-versions

- name: Cache
id: cache
- id: cache
name: Cache
uses: actions/cache@v2
with:
key: ${{ steps.node.outputs.node-version }}-${{ hashFiles('package-lock.json') }}
path: node_modules
key: 16.13.0-${{ hashFiles('package-lock.json') }}

- name: Install (Npm)
if: steps.cache.outputs.cache-hit != 'true'
- if: steps.cache.outputs.cache-hit != 'true'
name: Install (Npm)
run: npm ci --prefer-offline --no-audit --no-fund

- name: Prepare
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,24 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install (Node)
uses: actions/setup-node@v2
- id: node
name: Install (Node)
uses: actions/setup-node@v4
with:
cache: npm
node-version: "16.13.0"
node-version-file: .tool-versions

- name: Cache
id: cache
- id: cache
name: Cache
uses: actions/cache@v2
with:
key: ${{ steps.node.outputs.node-version }}-${{ hashFiles('package-lock.json') }}
path: node_modules
key: 16.13.0-${{ hashFiles('package-lock.json') }}

- name: Install (Npm)
if: steps.cache.outputs.cache-hit != 'true'
- if: steps.cache.outputs.cache-hit != 'true'
name: Install (Npm)
run: npm ci --prefer-offline --no-audit --no-fund

- name: Build
Expand All @@ -46,7 +47,7 @@ jobs:
NITRO_PRESET: cloudflare

- name: Publish
uses: cloudflare/wrangler-action@2.0.0
uses: cloudflare/wrangler-action@3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
Expand Down

0 comments on commit 414aaef

Please sign in to comment.