Skip to content

Commit

Permalink
Create a CICD pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdelhak Marouane committed Dec 19, 2023
1 parent 33b4b77 commit b17546a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload index.html
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
uses: actions/deploy-pages@v2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,4 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
dist
4 changes: 2 additions & 2 deletions link_checker_test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const generate_index_html = (url_errors) => {


// Write the error response to index.html
fs.writeFileSync('index.html', errorResponse);
fs.writeFileSync('./dist/index.html', errorResponse);

// Return the error status
return { status: 500, message: 'Error 500 - Server Error. Check index.html for details.' };
Expand All @@ -80,7 +80,7 @@ const generate_index_html = (url_errors) => {


// Write the OK response to index.html
fs.writeFileSync('index.html', okResponse);
fs.writeFileSync('./dist/index.html', okResponse);

// Return the OK status
return { status: 200, message: 'OK - Status 200. Check index.html for details.' };
Expand Down

0 comments on commit b17546a

Please sign in to comment.