GitHub Actions Guide
Overview
Section titled “Overview”Devsync is designed to work seamlessly with GitHub Actions. You can automatically update your LinkedIn profile, GitHub README, CV, and academics whenever you change DEVSYNC.json.
Complete Workflow Example
Section titled “Complete Workflow Example”Here’s the full workflow that powers the update-on-devsync-change.yml:
name: Update CV, README, LinkedIn & Academics
on: push: paths: - 'DEVSYNC.json'
permissions: contents: write
jobs: update: name: Update artifacts runs-on: ubuntu-latest
steps: - name: Checkout repository uses: actions/checkout@v6 with: persist-credentials: true fetch-depth: 0
- name: Setup Bun uses: oven-sh/setup-bun@v2 with: bun-version: latest
- name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '22'
- name: Install Puppeteer dependencies run: | sudo apt-get update sudo apt-get install -y \ libx11-6 libxcomposite1 libxcursor1 libxdamage1 libxext6 \ libxfixes3 libxi6 libxtst6 libnss3 libglib2.0-0 libgtk-3-0t64 \ libasound2t64 libxrandr2 libpangocairo-1.0-0 libatk1.0-0 \ libatk-bridge2.0-0 libcups2 libdbus-1-3 libdrm2 libgbm1 \ libgdk-pixbuf2.0-0
- name: Install dependencies run: bun install
- name: Update artifacts run: bunx @jannael/devsync build
- name: Push changes uses: stefanzweifel/git-auto-commit-action@v7 with: commit_message: 'docs: auto-update artifacts from DEVSYNC.json'Workflow Breakdown
Section titled “Workflow Breakdown”1. Trigger
Section titled “1. Trigger”on: push: paths: - 'DEVSYNC.json'Triggers only when DEVSYNC.json changes, avoiding unnecessary runs.
2. Checkout
Section titled “2. Checkout”- name: Checkout repository uses: actions/checkout@v6 with: persist-credentials: true fetch-depth: 0persist-credentials: true- Allows pushing changes backfetch-depth: 0- Gets full history (needed for some Git operations)
3. Setup Runtimes
Section titled “3. Setup Runtimes”- name: Setup Bun uses: oven-sh/setup-bun@v2 with: bun-version: latest
- name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '22'Both Bun and Node.js are required:
- Bun - Runs the CLI and builds the project
- Node.js - Required by Puppeteer for PDF generation
4. Install System Dependencies
Section titled “4. Install System Dependencies”- name: Install Puppeteer dependencies run: | sudo apt-get update sudo apt-get install -y \ libx11-6 libxcomposite1 libxcursor1 libxdamage1 libxext6 \ libxfixes3 libxi6 libxtst6 libnss3 libglib2.0-0 libgtk-3-0t64 \ libasound2t64 libxrandr2 libpangocairo-1.0-0 libatk1.0-0 \ libatk-bridge2.0-0 libcups2 libdbus-1-3 libdrm2 libgbm1 \ libgdk-pixbuf2.0-0These are Chrome/Chromium libraries needed for headless PDF generation.
5. Install Dependencies
Section titled “5. Install Dependencies”- name: Install dependencies run: bun installInstalls project dependencies including Puppeteer.
6. Run Build
Section titled “6. Run Build”- name: Update artifacts run: bunx @jannael/devsync buildThis command:
- Validates
DEVSYNC.json - Builds CV for each language
- Creates LinkedIn profile
- Creates GitHub profile
- Creates academics profile
- Generates PDFs
7. Push Changes
Section titled “7. Push Changes”- name: Push changes uses: stefanzweifel/git-auto-commit-action@v7 with: commit_message: 'docs: auto-update artifacts from DEVSYNC.json'Automatically commits and pushes generated files back to the repository.
Customization Examples
Section titled “Customization Examples”Add Notification on Success
Section titled “Add Notification on Success”- name: Notify on success if: success() run: | echo "Build completed successfully!" # Add Discord/Slack notification hereCache Dependencies
Section titled “Cache Dependencies”Speed up builds by caching Bun dependencies:
- name: Cache Bun dependencies uses: actions/cache@v4 with: path: ~/.bun/install/cache key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }} restore-keys: | ${{ runner.os }}-bun-Multiple Jobs (Parallel)
Section titled “Multiple Jobs (Parallel)”jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: oven-sh/setup-bun@v2 - run: bun install - run: bunx @jannael/devsync build
deploy: needs: build runs-on: ubuntu-latest steps: - name: Deploy to production run: echo "Deploy..."Security Considerations
Section titled “Security Considerations”Permissions
Section titled “Permissions”permissions: contents: write # Required to push changesOnly grant the minimum permissions needed. For Devsync, contents: write is required to commit generated files.
Secrets
Section titled “Secrets”If your workflow needs secrets (e.g., deploy tokens):
env: DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}Store secrets in repository settings → Secrets → Actions.
Troubleshooting
Section titled “Troubleshooting”Workflow Not Triggering
Section titled “Workflow Not Triggering”- Check that
DEVSYNC.jsonis in the root directory - Verify the path pattern matches exactly
- Check Actions tab for disabled workflows
Build Fails
Section titled “Build Fails”Common issues:
- Permission denied - Check
permissions: contents: write - Build fails: If you are using a custom template, ensure that all necessary system dependencies are installed within the workflow.
PDF Generation Fails
Section titled “PDF Generation Fails”- Verify all Chrome dependencies are installed
- Check that
node-version: '22'is set - Ensure
fetch-depth: 0in checkout step
Next Steps
Section titled “Next Steps”- See Configuration Reference for
DEVSYNC.jsonfields - Check Troubleshooting for common issues
- Learn about Create Template for custom setups