Deploy CoMLRL docs from commit 3d62576c539d68b552feac2b8fc4e4929db53245 #75
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 | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: 'pages' | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| SITE_BASE_URL: https://openmlrl.github.io | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v2 | |
| with: | |
| hugo-version: '0.152.2' | |
| extended: true | |
| - name: Checkout CoMLRL docs | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: OpenMLRL/CoMLRL | |
| path: comlrl-src | |
| - name: Build CoMLRL docs | |
| working-directory: comlrl-src | |
| env: | |
| HUGO_RELATIVEURLS: "false" | |
| run: hugo --gc --minify -s docs -b "${SITE_BASE_URL}/CoMLRL/" | |
| - name: Build with Hugo | |
| run: hugo --gc --minify -b "${SITE_BASE_URL}" | |
| - name: Bundle CoMLRL docs into final site | |
| run: | | |
| rm -rf public/CoMLRL | |
| mkdir -p public/CoMLRL | |
| rsync -a comlrl-src/docs/public/ public/CoMLRL/ | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: public | |
| 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 |