Skip to content

fix: ci 5

fix: ci 5 #6

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
compile:
name: Compile Module
runs-on: ubuntu-latest
strategy:
matrix:
module:
[
P1/PengenalanBahasaC_IND,
P2/PerulanganPercabanganArrayString_IND,
P3/FungsidanRekursi_IND,
P4/PointerdanStruct_IND,
]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup LaTeX
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
pre_compile: |
sed -i 's|% \\input{'${{ matrix.module }}'.tex|\\input{'${{ matrix.module }}'.tex}|' main.tex
working_directory: .
docker_image: ghcr.io/xu-cheng/texlive-full:20240315
- name: Rename and Move Compiled PDF
run: |
mkdir -p dist
MODULE_NAME="${{ matrix.module }}"
MODULE_NAME=${MODULE_NAME//\//_}
mv main.pdf dist/$MODULE_NAME.pdf
- name: Upload Compiled PDF
uses: actions/upload-artifact@v2
with:
name: Compiled-${{ matrix.module }}
path: dist/
deploy:
name: Deploy
if: github.event_name != 'pull_request'
needs: compile
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
concurrency:
group: pages
cancel-in-progress: false
steps:
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Deploy to Pages
id: deployment
uses: actions/deploy-pages@v4