ci: fix svelte app deploy config base path #248
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: ['main'] | |
| pull_request: | |
| branches: ['main'] | |
| permissions: | |
| contents: write | |
| pages: write | |
| issues: write | |
| id-token: write | |
| concurrency: | |
| group: 'pages' | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-24.04 | |
| env: | |
| NODE_OPTIONS: '--max-old-space-size=4096' | |
| steps: | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.17.0 | |
| - name: Git checkout for source code analysis | |
| uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Cache Node.js modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | |
| - name: Generate assets | |
| run: npm run assets:sync | |
| - name: Run unit tests with coverage | |
| run: npm run test:ci | |
| continue-on-error: true | |
| - name: Run qa | |
| run: | | |
| npm run qa:lint | |
| npm run qa:duplication | |
| - name: Release | |
| if: github.ref == 'refs/heads/main' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: | | |
| cp package.json src/ | |
| cp README.md src/ | |
| npm run release -- --r git@github.com:Open3CL/engine.git | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.17.0 | |
| - name: Build pages | |
| if: github.ref == 'refs/heads/main' | |
| env: | |
| PUBLIC_REPORTS_URL: https://open3cl.github.io/engine/reports/corpus | |
| SVELTE_BASE_PATH: /engine/build/ | |
| run: | | |
| cd pages/open3CL | |
| npm ci | |
| npm run build | |
| cd ../../ | |
| cp -R pages/open3CL/build dist | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Upload dist repository | |
| path: 'dist' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |