Skip to content

Commit 7eb4d11

Browse files
committed
fix(build): remove use of __dirname; update Node
1 parent 516099a commit 7eb4d11

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Diff for: .github/workflows/deploy.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy site
33
on:
44
# Runs on pushes targeting the default branch
55
push:
6-
branches: ['main']
6+
branches: ['main', 'deploy-test']
77

88
# Allows you to run this workflow manually from the Actions tab
99
workflow_dispatch:
@@ -30,12 +30,18 @@ jobs:
3030
env:
3131
DEPLOY_DIR: _site/
3232
DEPLOY_BRANCH: gh-pages
33+
NODE_VERSION: 20.x
3334
steps:
3435
- name: Checkout
35-
uses: actions/checkout@v3
36+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3637
with:
3738
submodules: recursive
3839

40+
- name: Use Node.js ${{ env.NODE_VERSION }}
41+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
42+
with:
43+
node-version: ${{ env.NODE_VERSION }}
44+
3945
- name: Prepare deployment branch
4046
run: |
4147
mkdir "${DEPLOY_DIR}"

Diff for: eleventy.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export default function config(eleventyConfig) {
155155

156156
eleventyConfig.addAsyncShortcode('attachment', async (ticketId, filename) => {
157157
const content = await fs.promises.readFile(
158-
path.join(__dirname, `raw-attachment/ticket/${ticketId}`, filename)
158+
path.resolve(`./raw-attachment/ticket/${ticketId}`, filename)
159159
)
160160
return content.toString()
161161
})

0 commit comments

Comments
 (0)