Experiences and other data comes from a single json file #46
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 React App to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout 🛒 | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - name: Install Dependencies 📦 | |
| run: npm ci | |
| - name: Build Resume as HTML | |
| run: node resume-generator/compile.js | |
| - name: Build Project 🏗️ | |
| run: npm run build | |
| env: | |
| PUBLIC_URL: 'craigiswayne.com' | |
| - name: List files | |
| run: ls -laGh ./build | |
| - name: Install Puppeteer Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -yq libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2t64 libnss3 libxss1 libxtst6 | |
| - name: Generate Resume PDF | |
| run: node resume-generator/create_pdf_from_html.js | |
| - name: List files | |
| run: ls -laGh ./build | |
| - name: Deploy to GitHub Pages 🚀 | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./build | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' | |
| commit_message: 'Automated deployment to GitHub Pages' | |
| cname: 'craigiswayne.com' | |
| tests: | |
| needs: build-and-deploy | |
| name: 'Tests' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 'Checkout repository' | |
| uses: actions/checkout@v6 | |
| - name: 'API requests' | |
| id: 'http-client' | |
| uses: madhead/intellij-http-client-action@latest | |
| with: | |
| files: |- | |
| ./tests/important-files.http | |
| ./tests/site-response.http | |
| report: true | |
| - name: 'Publish Test Results' | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| if: (!cancelled()) | |
| with: | |
| files: | | |
| reports/**/*.xml | |
| tests-cypress: | |
| name: Tests 🧪 | |
| needs: build-and-deploy | |
| uses: craigiswayne/ci-cd/.github/workflows/[email protected] | |
| with: | |
| run_build: false | |
| run_lint: false | |
| test_command: 'cy:run' |