Skip to content

Commit

Permalink
ci: fix workflow to deploy on GitHub pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
poirierlouis committed Feb 3, 2024
1 parent 3d54e81 commit bcda9d5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
cancel-in-progress: false

jobs:
# Build / test / upload pages
# Build and test job
build:
runs-on: ubuntu-latest
steps:
Expand All @@ -23,14 +23,15 @@ jobs:
node-version: '18'
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm run build:github --if-present
- run: npm run test
- uses: actions/configure-pages@v4
- uses: actions/upload-pages-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./dist/browser/
name: ndb-dist
path: dist/browser/
if-no-files-found: error

# Deploy pages
# Deployment job
deploy:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand All @@ -43,6 +44,13 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
- uses: actions/download-artifact@v4
with:
name: ndb-dist
path: .
- uses: actions/configure-pages@v4
- uses: actions/upload-pages-artifact@v3
with:
path: .
- id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build:github": "ng build --base-href /cp2077-nativedb/",
"postbuild": "gulp -f gulp.mjs compress-brotli",
"prod": "npx http-server ./dist/browser/ --port 4400 --brotli -c-1",
"watch": "ng build --watch --configuration development",
Expand Down

0 comments on commit bcda9d5

Please sign in to comment.