Deploy to GitHub Pages #166
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 to GitHub Pages | |
| on: | |
| workflow_run: | |
| workflows: ["Tests"] | |
| types: | |
| - completed | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }} | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Update APT Package List | |
| run: sudo apt-get update | |
| - name: Install pandoc | |
| run: sudo apt-get install -y pandoc | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Setup Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Install Clojure tools | |
| uses: DeLaGuardo/setup-clojure@12.1 | |
| with: | |
| cli: latest | |
| bb: latest | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build noon.client.doc namespace | |
| run: bb build-client-doc-ns | |
| - name: Build client with shadow-cljs | |
| run: npx shadow-cljs release client | |
| - name: Build widget with shadow-cljs | |
| run: npx shadow-cljs release widget | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'public' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |