Merge pull request #34 from takanotaiga/refactor/astar_planner #70
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 Map Builder | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Configure GitHub Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install map_builder dependencies | |
| working-directory: map_builder | |
| run: npm ci | |
| - name: Build map_builder with Pages base path | |
| working-directory: map_builder | |
| env: | |
| PAGES_BASE_PATH: ${{ steps.pages.outputs.base_path }} | |
| run: | | |
| BASE_PATH="${PAGES_BASE_PATH%/}" | |
| if [ -z "$BASE_PATH" ] || [ "$BASE_PATH" = "." ]; then | |
| BASE_PATH="/map_builder/" | |
| else | |
| BASE_PATH="$BASE_PATH/map_builder/" | |
| fi | |
| npm run build -- --base="$BASE_PATH" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install MkDocs dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install mkdocs mkdocs-material mkdocs-awesome-pages-plugin mkdocs-same-dir pymdown-extensions | |
| - name: Build MkDocs site | |
| run: mkdocs build --clean | |
| - name: Bundle map_builder into MkDocs site | |
| run: | | |
| rm -rf site/map_builder | |
| mkdir -p site/map_builder | |
| cp -R map_builder/dist/. site/map_builder/ | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |