Skip to content

Commit

Permalink
fix(build): remove use of __dirname; update Node (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
timmywil committed Sep 18, 2024
1 parent 516099a commit e99f4d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,18 @@ jobs:
env:
DEPLOY_DIR: _site/
DEPLOY_BRANCH: gh-pages
NODE_VERSION: 20.x
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Prepare deployment branch
run: |
mkdir "${DEPLOY_DIR}"
Expand Down
2 changes: 1 addition & 1 deletion eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default function config(eleventyConfig) {

eleventyConfig.addAsyncShortcode('attachment', async (ticketId, filename) => {
const content = await fs.promises.readFile(
path.join(__dirname, `raw-attachment/ticket/${ticketId}`, filename)
path.resolve(`./raw-attachment/ticket/${ticketId}`, filename)
)
return content.toString()
})
Expand Down

0 comments on commit e99f4d1

Please sign in to comment.