Files
palkkakysely/.github/workflows/build.yml
2026-03-11 10:50:21 +02:00

55 lines
1.5 KiB
YAML

name: Build
on:
push:
branches: [master]
pull_request:
branches: [master]
#schedule:
# Update automatically on weekdays during work hours
#- cron: '0 10,13,16 * * 1-5'
# ... and every night
#- cron: '0 0 * * *'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: j178/prek-action@v1.1.1
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v7
with:
python-version: "3.12"
enable-cache: true
- run: uv sync
- run: make -j3 PYTHON="uv run python"
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: yarn
cache-dependency-path: analysaattori/yarn.lock
- run: yarn
working-directory: analysaattori
- run: yarn build -- --base=/palkkakysely/analysaattori/
working-directory: analysaattori
env:
GENERATE_SOURCEMAP: "false"
- run: cp -a analysaattori/dist ./out/analysaattori
- run: ls -laR out
- run: touch out/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: out
clean: false
if: ${{ github.event_name == 'push' }}
env:
GIT_AUTHOR_EMAIL: "koodiklinikka-robot@example.com"
GIT_AUTHOR_NAME: "Koodiklinikka Robot"
GIT_COMMITTER_EMAIL: "koodiklinikka-robot@example.com"
GIT_COMMITTER_NAME: "Koodiklinikka Robot"