Publish the designer, too #13
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 Freenit source repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: freenit-framework/devops | |
| path: freenit | |
| - name: Debug Freenit checkout | |
| run: | | |
| pwd | |
| find . -maxdepth 3 -type d | sort | |
| find freenit -maxdepth 3 -type d | sort || true | |
| - 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" | |
| - 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: freenit/services/designer | |
| run: npm ci | |
| - name: Generate designer components | |
| working-directory: freenit/services/designer | |
| run: OFFLINE=yes ./bin/components.sh | |
| - name: Build designer | |
| working-directory: freenit/services/designer | |
| run: npm run build | |
| - name: Build site | |
| run: mkdocs build --strict | |
| - name: Add designer to published site | |
| run: | | |
| echo "designer/build contents:" | |
| find freenit/services/designer/build -maxdepth 2 -type f | sort || true | |
| mkdir -p site/design | |
| cp -R freenit/services/designer/build/. site/design/ | |
| touch site/.nojekyll | |
| echo "site/design contents:" | |
| find site/design -maxdepth 2 -type f | sort || true | |
| - name: Verify published designer files | |
| run: | | |
| find site/design -maxdepth 2 -type f | sort | |
| test -f site/design/index.html | |
| - 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 |