central-arch-doc/.gitea/workflows/build.yaml
Elyan dd7406b0ae
All checks were successful
Central(Architecture) Docs Build / Build Documentation (push) Successful in 18s
Run CI when pushing to devops/** branches
2024-11-02 10:40:34 +01:00

55 lines
1.6 KiB
YAML

# Based on https://github.com/riscv/riscv-isa-manual/blob/main/.github/workflows/isa-build.yml
name: Central(Architecture) Docs Build
on:
push:
branches:
- master
- 'devops/**'
pull_request:
branches:
- master
- 'devops/**'
types: [opened, synchronize]
env:
DOCKER_IMG: docker-asciidoctor-wavedrom
jobs:
build:
name: Build Documentation
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set short SHA
run: echo "SHORT_SHA=$(echo ${GITEA_SHA::7})" >> $GITEA_ENV
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITEA_ENV
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.CONTAINER_REGISTRY_URL }}
username: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
- name: Pull Container
id: pull_container_image
run: docker pull ${{ vars.CONTAINER_REGISTRY_URL }}/${{ gitea.repository_owner }}/${{ env.DOCKER_IMG }}:latest
- name: Build Files
id: build_files
if: steps.pull_container_image.outcome == 'success'
run: make
- name: Upload central-execution-engine-spec.pdf
if: steps.build_files.outcome == 'success'
uses: christopherhx/gitea-upload-artifact@v4
with:
name: central-execution-engine-spec-${{ env.SHORT_SHA }}.pdf
path: ${{ gitea.workspace }}/build/central-execution-engine-spec.pdf
retention-days: 7