Version 3.0.13. #32
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: Deploy Docs and App to GitHub Pages | |
| on: | |
| push: | |
| branches: [docs, main] | |
| workflow_dispatch: | |
| permissions: | |
| pages: write | |
| id-token: write | |
| env: | |
| VITE_API_LOCATION: ${{ secrets.VITE_API_LOCATION }} | |
| jobs: | |
| build: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout SimulationVuer | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18.17.1 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build docs | |
| run: | | |
| npm run docs:build | |
| touch docs/.vitepress/dist/.nojekyll | |
| - name: Build app | |
| run: npm run build-app | |
| - name: Merge docs and app | |
| run: | | |
| mkdir -p site/app | |
| cp -r ./docs/.vitepress/dist/* ./site | |
| cp -r ./dist/* ./site/app | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./site | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |