Files
digital-garden/.gitea/workflows/ci.yaml
Daniël Groothuis ea12b6dec6
Some checks failed
/ build (push) Successful in 35s
/ deploy (push) Has been skipped
/ docker-build (push) Failing after 1m10s
chore(config): Fixed linting errors for CI
2025-10-31 16:33:32 +01:00

74 lines
1.6 KiB
YAML

---
on:
push:
branches:
- main
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
check-latest: true
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Run checks
run: npm run check
- name: Run tests
run: npm test
- name: Ensure build and bundle info
run: npx quartz build --bundleInfo
docker-build:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ secrets.REGISTRY_URL }}/dgroothuis/digital-garden:${{ gitea.sha }},${{ secrets.REGISTRY_URL }}/dgroothuis/digital-garden:latest
deploy:
needs: docker-build
runs-on: ubuntu-latest
steps:
- name: Fake Deploy
run: echo "Deploying"