50 lines
1.1 KiB
YAML
50 lines
1.1 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@v6
|
|
|
|
- name: Install firefox runtime dependencies
|
|
run: apt-get update && apt-get install -y libgtk-3-0 libasound2 libx11-xcb1
|
|
|
|
- name: Setup Firefox
|
|
id: setup-firefox
|
|
uses: browser-actions/setup-firefox@v1
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
|
PUPPETEER_BROWSER: firefox
|
|
PUPPETEER_EXECUTABLE_PATH: ${{ steps.setup-firefox.outputs.firefox-path }}
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: build
|
|
path: build/
|
|
retention-days: 7
|
|
|
|
#- name: Deploy to statichost.eu
|
|
# if: github.ref == 'refs/heads/main'
|
|
# run: |
|
|
# curl -XPOST https://builder.statichost.eu/repomaa-cv
|