Merge pull request #121 from akshay2211/chore/release-script-multimodule #54
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 Site | |
| on: | |
| push: | |
| branches: [main] | |
| # Skip the docs/WASM redeploy when a push only touches files that don't | |
| # affect the published site or the source: README, CHANGELOG, license, | |
| # gitignore, media used only by GitHub-rendered README, etc. | |
| # NOTE: changes under `docs/` and `mkdocs.yml` are intentionally NOT | |
| # ignored — those are the docs-site sources and must trigger a rebuild. | |
| paths-ignore: | |
| - 'README.md' | |
| - 'CHANGELOG.md' | |
| - 'SECURITY.md' | |
| - 'ROADMAP.md' | |
| - 'CODE_OF_CONDUCT.md' | |
| - 'LICENSE' | |
| - '.gitignore' | |
| - 'media/**' | |
| - '.github/ISSUE_TEMPLATE/**' | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.11 | |
| - run: pip install mkdocs-material mkdocs-minify-plugin mkdocs-gen-files | |
| - run: ./gradlew dokkaGenerateHtml | |
| - run: mkdir -p docs/dokka && cp -r DrawBox/build/dokka/html/* docs/dokka/ | |
| - run: mkdocs build | |
| - name: Build WASM sample | |
| run: ./gradlew :webApp:wasmJsBrowserDistribution | |
| - name: Stage WASM sample under /sample | |
| run: | | |
| mkdir -p site/sample | |
| cp -r webApp/build/dist/wasmJs/productionExecutable/* site/sample/ | |
| - run: python docs/generate_sitemap.py site https://akshay2211.github.io/DrawBox/ | |
| - run: cat site/sitemap.xml | |
| - uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./site |