Merge pull request #58 from JPL-Devin/main #1
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: Pages | |
| # The site is docs/ rendered by MkDocs, republished when a page or the site | |
| # configuration changes on main. --strict: a broken link fails the deployment. | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'docs/**' | |
| - 'mkdocs.yml' | |
| - 'docs-requirements.txt' | |
| - 'scripts/mkdocs_repo_links.py' | |
| - '.github/workflows/pages.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # One deployment at a time; cancelling one in flight would leave the site behind. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build the site | |
| # The site is published from Open-MBEE/OpenSysML; a fork would deploy the same | |
| # pages under its own domain. | |
| if: github.repository == 'Open-MBEE/OpenSysML' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: pip | |
| cache-dependency-path: docs-requirements.txt | |
| - name: Install the toolchain | |
| run: pip install -r docs-requirements.txt | |
| - uses: actions/configure-pages@v5 | |
| - name: Build | |
| run: mkdocs build --strict --site-dir site | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site | |
| deploy: | |
| name: Deploy to Pages | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |