Add licensing contact information #27
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: Build and Deploy GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.1' | |
| bundler-cache: true | |
| cache-version: 1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Install Ruby dependencies | |
| run: bundle install | |
| - name: Compile TypeScript | |
| run: npx tsc | |
| continue-on-error: false | |
| - name: Verify TypeScript compilation | |
| run: | | |
| echo "π Verifying TypeScript compilation..." | |
| if [ ! -f "assets/js/main.js" ]; then | |
| echo "β TypeScript compilation failed - main.js not found" | |
| exit 1 | |
| fi | |
| if [ ! -f "assets/js/canvas-effects.js" ]; then | |
| echo "β TypeScript compilation failed - canvas-effects.js not found" | |
| exit 1 | |
| fi | |
| echo "β TypeScript compiled successfully" | |
| echo "π¦ Compiled files:" | |
| ls -lh assets/js/*.js | awk '{print " - " $9 " (" $5 ")"}' | |
| - name: Build Jekyll site | |
| run: bundle exec jekyll build | |
| env: | |
| JEKYLL_ENV: production | |
| - name: Verify Jekyll build | |
| run: | | |
| if [ ! -d "_site" ]; then | |
| echo "β Jekyll build failed - _site directory not found" | |
| exit 1 | |
| fi | |
| echo "β Jekyll build successful" | |
| echo "π¦ Site size: $(du -sh _site | cut -f1)" | |
| - name: Verify PDFs are present | |
| run: | | |
| echo "π Verifying PDF files..." | |
| if [ ! -f "docs/paper.pdf" ]; then | |
| echo "β Error: paper.pdf not found in docs/" | |
| exit 1 | |
| fi | |
| if [ ! -f "docs/presentation.pdf" ]; then | |
| echo "β Error: presentation.pdf not found in docs/" | |
| exit 1 | |
| fi | |
| if [ ! -f "docs/reference.pdf" ]; then | |
| echo "β Error: reference.pdf not found in docs/" | |
| exit 1 | |
| fi | |
| echo "β All PDFs found in repository" | |
| ls -lh docs/*.pdf | awk '{print " - " $9 " (" $5 ")"}' | |
| - name: Check for common issues | |
| run: | | |
| echo "π Checking for common issues..." | |
| if [ ! -f "_site/index.html" ]; then | |
| echo "β οΈ Warning: index.html not found in _site" | |
| else | |
| echo "β index.html found" | |
| fi | |
| if [ ! -f "_site/assets/js/main.js" ]; then | |
| echo "β οΈ Warning: main.js not found - TypeScript may not have compiled" | |
| else | |
| echo "β main.js found" | |
| fi | |
| if [ ! -f "_site/assets/js/canvas-effects.js" ]; then | |
| echo "β οΈ Warning: canvas-effects.js not found - Canvas effects may not work" | |
| else | |
| echo "β canvas-effects.js found" | |
| fi | |
| - name: Verify PDFs in Jekyll build | |
| run: | | |
| echo "π Verifying PDFs are included in Jekyll build..." | |
| if [ ! -f "_site/docs/paper.pdf" ]; then | |
| echo "β Error: paper.pdf not found in _site/docs/" | |
| exit 1 | |
| fi | |
| if [ ! -f "_site/docs/presentation.pdf" ]; then | |
| echo "β Error: presentation.pdf not found in _site/docs/" | |
| exit 1 | |
| fi | |
| if [ ! -f "_site/docs/reference.pdf" ]; then | |
| echo "β Error: reference.pdf not found in _site/docs/" | |
| exit 1 | |
| fi | |
| echo "β All PDFs found in Jekyll build" | |
| ls -lh _site/docs/*.pdf | awk '{print " - " $9 " (" $5 ")"}' | |
| echo "π Total files in _site: $(find _site -type f | wc -l)" | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| with: | |
| enablement: true | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./_site | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| - name: Deployment status | |
| run: | | |
| echo "π Deployment successful!" | |
| echo "π Site URL: ${{ steps.deployment.outputs.page_url }}" |