1
0
Fork 0
forked from swablab/website
website/.forgejo/workflows/main.yml
2025-02-22 18:07:31 +00:00

53 lines
1.4 KiB
YAML

name: Build Astro
on: [push, workflow_dispatch]
env:
ASTRO_TELEMETRY_DISABLED: true
jobs:
check:
name: 🧪 Astro check
runs-on: docker
container:
image: node:lts
steps:
- uses: https://github.com/actions/checkout@v4
- uses: https://github.com/denoland/setup-deno@v2
with:
deno-version: v2.x
- run: deno task install
- run: deno task check
deploy:
name: 🚢 Deploy
runs-on: docker
container:
image: node:lts
if: github.ref == 'refs/heads/main'
needs: [check]
steps:
- uses: https://github.com/actions/checkout@v4
- uses: https://github.com/denoland/setup-deno@v2
with:
deno-version: v2.x
- run: deno task install
- run: deno task build
- name: build containerfile
id: build-image
uses: https://github.com/redhat-actions/buildah-build@v2
with:
image: website
tags: latest
containerfiles: |
./Containerfile
- name: Push to registry
uses: https://github.com/redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
username: token
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ github.server_url }}/${{ github.repository }}