Publish the designer, too #6
Workflow file for this run
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 MkDocs to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Check out designer repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: freenit-framework/designer | |
| path: designer | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| cache-dependency-path: designer/package-lock.json | |
| - name: Install documentation dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install \ | |
| mkdocs \ | |
| mkdocs-material \ | |
| mkdocs-awesome-pages-plugin \ | |
| pymdown-extensions | |
| - name: Install designer dependencies | |
| working-directory: designer | |
| run: npm ci | |
| - name: Generate designer components | |
| working-directory: designer | |
| run: OFFLINE=yes ./bin/components.sh | |
| - name: Build designer | |
| working-directory: designer | |
| run: npm run build | |
| - name: Build site | |
| run: mkdocs build --strict | |
| - name: Add designer to published site | |
| run: | | |
| mkdir -p site/design | |
| cp -R designer/build/. site/design/ | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |