Skip to content

Commit

Permalink
test variable for buildDir
Browse files Browse the repository at this point in the history
  • Loading branch information
hbuchel committed May 28, 2024
1 parent c0f96e8 commit f6dd6f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/accessibility_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { getChangedPages } = require('./.github/workflows/scripts/check_for_changed_pages.js');
return getChangedPages({github, context});
return getChangedPages({github, context}, env.BUILD_DIR);
- name: Run site
run: |
python -m http.server 3000 -d ${{ env.BUILD_DIR }} &
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/scripts/check_for_changed_pages.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
getChangedPages: ({ github, context }) => {
getChangedPages: ({ github, context }, buildDir) => {
console.log('buildDir: ', buildDir);
const fs = require('fs');
const cheerio = require('cheerio');

Expand Down Expand Up @@ -45,7 +46,7 @@ module.exports = {
}
});

const siteMap = fs.readFileSync('client/www/next-build/sitemap.xml');
const siteMap = fs.readFileSync(`${buildDir}/sitemap.xml`);

const siteMapParse = cheerio.load(siteMap, {
xml: true
Expand Down

0 comments on commit f6dd6f8

Please sign in to comment.