Skip to content

Commit

Permalink
fix(build): remove use of __dirname; update Node
Browse files Browse the repository at this point in the history
  • Loading branch information
timmywil committed Sep 18, 2024
1 parent 516099a commit 7eb4d11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy site
on:
# Runs on pushes targeting the default branch
push:
branches: ['main']
branches: ['main', 'deploy-test']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -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 7eb4d11

Please sign in to comment.