Files
cv/.github/workflows/build.yml
Joakim Repomaa 72a636d175 initial commit
2026-02-17 02:15:25 +02:00

53 lines
1.2 KiB
YAML

name: Build and Deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
PUPPETEER_SKIP_DOWNLOAD: true
PUPPETEER_EXECUTABLE_PATH: chrome
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: build/
retention-days: 7
# Uncomment and configure for deployment:
# - name: Deploy to server
# if: github.ref == 'refs/heads/main'
# run: |
# # Add your deployment commands here
# # Example using rsync:
# # rsync -avz --delete build/ user@your-server:/var/www/cv/
# env:
# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}