Deploy Course Demos to GitHub Pages #16
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 Course Demos to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'labs/activity5-investment-advisor/**' | |
| - 'labs/activity6-finance-advisor/**' | |
| - 'labs/activity7-rag/website/**' | |
| - '.github/workflows/deploy-pages.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Assemble site (Finance Advisor at root; Investment Advisor + Cook & Bake RAG demo under subpaths) | |
| run: | | |
| mkdir -p _site/investment-advisor _site/cook-bake | |
| # Root = Activity 6 Finance Advisor dashboard (self-contained) | |
| cp labs/activity6-finance-advisor/index.html _site/index.html | |
| # Activity 5 Investment Advisor lead-magnet site | |
| cp labs/activity5-investment-advisor/index.html _site/investment-advisor/index.html | |
| cp labs/activity5-investment-advisor/script.js _site/investment-advisor/script.js | |
| cp labs/activity5-investment-advisor/style.css _site/investment-advisor/style.css | |
| # Activity 7b Cook & Bake Academy RAG chatbot site | |
| cp labs/activity7-rag/website/index.html _site/cook-bake/index.html | |
| cp labs/activity7-rag/website/script.js _site/cook-bake/script.js | |
| cp labs/activity7-rag/website/styles.css _site/cook-bake/styles.css | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: '_site' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |