firq-dev-website/.forgejo/workflows/build_preview.yml
Firq c4d73c2f98
All checks were successful
/ build-site (push) Successful in 1m45s
/ publish (push) Successful in 6s
/ checking (push) Successful in 12s
Fixed typo
2024-06-15 19:30:25 +02:00

71 lines
2 KiB
YAML

on:
push:
tags:
- '[0-9]+\.[0-9]+\.[0-9]+-pre\.[0-9]+'
jobs:
checking:
runs-on: docker
container: node:lts
steps:
- name: Checkout source code
uses: https://code.forgejo.org/actions/checkout@v3
- name: Install packages
run: npm install
- name: Run astro check (linting + static analysis)
run: npm run astro check
build-site:
needs: [checking]
if: success()
runs-on: dind
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: forgejo.neshweb.net
username: ${{ secrets.FORGEJO_USERNAME }}
password: ${{ secrets.FORGEJO_TOKEN }}
- name: Push to Package Registry
uses: docker/build-push-action@v5
with:
push: true
tags: forgejo.neshweb.net/firq/firq-dev-website:${{ github.ref_name }}, forgejo.neshweb.net/firq/firq-dev-website:preview
publish:
needs: [build-site]
if: success()
runs-on: docker
steps:
- name: Release New Version
uses: https://code.forgejo.org/actions/forgejo-release@v1
with:
direction: upload
url: https://forgejo.neshweb.net
release-dir: release
token: ${{ secrets.FORGEJO_TOKEN }}
tag: ${{ github.ref_name }}
prerelease: true
# doesn't work atm
# unlighthouse:
# needs: [publish]
# if: success()
# runs-on: docker
# container: registry.gitlab.com/gitlab-ci-utils/lighthouse:latest
# services:
# website:
# image: forgejo.neshweb.net/firq/firq-dev-website:preview
# steps:
# - name: Install Dependencies
# run: npm install @unlighthouse/cli puppeteer
# - name: Run unlighthouse
# run: node_modules/.bin/unlighthouse-ci
# - name: Upload reports
# uses: actions/upload-artifact@v3
# with:
# name: unlighthouse-reports
# path: unlighthouse-reports/