Skip to content

fix: ci 45

fix: ci 45 #47

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
# INDONESIA
jobs:
compile_and_deploy_IND:
name: Compile
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
echo "MODULE_NAME_SANITIZED=${MODULE_NAME}" >> $GITHUB_ENV
- name: Upload Compiled PDF
uses: actions/upload-artifact@v4
with:
name: ${{env.MODULE_NAME_SANITIZED}}
path: dist
compile_and_deploy_ENG:
name: Compile
runs-on: ubuntu-latest
needs: [compile_and_deploy_IND]
strategy:
matrix:
module:
[
P1/PengenalanBahasaC_ENG,
P2/PerulanganPercabanganArrayString_ENG,
P3/FungsidanRekursi_ENG,
P4/PointerdanStruct_ENG,
]
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
echo "MODULE_NAME_SANITIZED=${MODULE_NAME}" >> $GITHUB_ENV
- name: Upload Compiled PDF
uses: actions/upload-artifact@v4
with:
name: ${{env.MODULE_NAME_SANITIZED}}
path: dist
merge-artifacts:
runs-on: ubuntu-latest
needs: [compile_and_deploy_IND, compile_and_deploy_ENG]
steps:
# Langkah 1: Checkout kode (jika diperlukan)
- uses: actions/checkout@v2
- uses: actions/upload-artifact/merge@v4
with:
name: github-pages
deploy:
name: Deploy
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
needs: merge-artifacts
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/[email protected]
- name: Deploy to Pages
id: deployment
uses: actions/deploy-pages@v4
artifact_name: github-pages

Check failure on line 123 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 123, Col: 9): Unexpected value 'artifact_name'