ci: add site pipeline
This commit is contained in:
30
.gitea/workflows/site.yaml
Normal file
30
.gitea/workflows/site.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
name: site
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check file references and external requests
|
||||
run: python3 tools/check_site.py
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check tooling
|
||||
run: docker version --format '{{.Server.Version}}' && docker compose version
|
||||
- name: Build image
|
||||
run: docker build -t rezayaghobi-site:${GITHUB_SHA::7} .
|
||||
- name: Validate nginx config
|
||||
run: docker run --rm rezayaghobi-site:${GITHUB_SHA::7} nginx -t
|
||||
- name: Check site files are in the image
|
||||
run: |
|
||||
docker run --rm --entrypoint sh rezayaghobi-site:${GITHUB_SHA::7} \
|
||||
-c 'test -f /usr/share/nginx/html/index.html && test -d /usr/share/nginx/html/assets'
|
||||
Reference in New Issue
Block a user