Skip to content

chore(deps): update workspace/sample-javafx-project digest to 1bba951 #2947

chore(deps): update workspace/sample-javafx-project digest to 1bba951

chore(deps): update workspace/sample-javafx-project digest to 1bba951 #2947

name: Build the LaTeX slides and deploy
on:
push:
branches-ignore:
- 'autodelivery**'
- 'bump-**'
- 'renovate/**'
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
pull_request:
workflow_dispatch:
workflow_run:
workflows: ["pages-build-deployment"]
types:
- completed
jobs:
# TODO: once all slides are in markdown, use the version from gh pages
compute-version:
runs-on: ubuntu-latest
outputs:
commit-count: ${{ steps.commit-counter.outputs.commits }}
version: ${{ steps.version-compute.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Count the commits so far
id: commit-counter
run: echo "::set-output name=commits::$(git rev-list --count HEAD)"
- name: Create version
id: version-compute
run: echo "::set-output name=version::${{ steps.commit-counter.outputs.commits }}.$(date +"%Y.%-m%d")"
- name: Verify the version
run: ruby -e 'unless /^\d+\.[1-9]\d*\.[1-9]\d*$/.match?("${{ steps.version-compute.outputs.version }}") then exit 1 end'
create-and-deploy-pdfs-from-website:
needs:
- compute-version
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout the pdf creation script
uses: danysk/action-checkout@0.2.22
- name: Checkout gh-pages
uses: actions/checkout@v4.2.2
with:
path: pages
ref: gh-pages
- name: Setup Ruby
uses: ruby/setup-ruby@v1.202.0
with:
working-directory: slides-markdown/shared-slides
- name: Setup Chrome
uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
- name: Update the package database
run: sudo apt-get update
- name: Install pdfinfo
run: sudo apt-get install -y poppler-utils
- name: Make the pdfs
run: slides-markdown/shared-slides/makepdfs.rb pages
- name: Deliver the pdfs
# Once all slides are in markdown, enable the conditional deployment
# if: github.event_name == 'workflow_run'
if: >-
(github.event_name == 'push' && github.ref == 'refs/heads/master')
|| github.event_name == 'workflow_dispatch'
|| github.event_name == 'workflow_run'
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: true
artifacts: "*.pdf"
replacesArtifacts: true
tag: ${{ needs.compute-version.outputs.version }}
token: ${{ github.token }}
build-and-publish-latex:
needs:
- compute-version
runs-on: ubuntu-latest
steps:
- name: Verify the version
run: ruby -e 'unless /^\d+\.[1-9]\d*\.[1-9]\d*$/.match?("${{ needs.compute-version.outputs.version }}") then exit 1 end'
- name: Checkout
uses: danysk/action-checkout@0.2.22
- name: Compile LaTeX
id: compile
uses: DanySK/compile-latex-action@1910fcbeeeaed692e47e90c9ea1a42ecb8f6dc3a
- name: Deliver the pdfs
if: >-
(github.event_name == 'push' && github.ref == 'refs/heads/master')
|| github.event_name == 'workflow_dispatch'
|| github.event_name == 'workflow_run'
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: true
artifacts: ${{ steps.compile.outputs.compiled-files }}
replacesArtifacts: true
tag: ${{ needs.compute-version.outputs.version }}
# deploy-archives:
# runs-on: ubuntu-latest
# needs:
# - compute-version
# steps:
# - name: Verify the version
# run: ruby -e 'unless /^\d+\.[1-9]\d*\.[1-9]\d*$/.match?("${{ needs.compute-version.outputs.version }}") then exit 1 end'
# - name: Checkout
# uses: danysk/action-checkout@0.2.2
# - name: Remove PMD/Checkstyle/Spotbugs configuration from the first labs
# run: ./cleanup_project_files.rb
# - name: Create archives
# id: archive
# run: |
# for file in workspace/*/; do
# name="${file#*/}"
# destination="${name%*/}.zip"
# echo Creating "$destination" from $file
# zip -r "$destination" "$file"
# results="$results,$destination"
# done
# - name: Release
# if: >-
# (github.event_name == 'push' && github.ref == 'refs/heads/master')
# || github.event_name == 'workflow_dispatch'
# || github.event_name == 'workflow_run'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# uses: ncipollo/release-action@v1.10.0
# with:
# allowUpdates: true
# artifacts: "*.zip"
# replacesArtifacts: true
# tag: ${{ needs.compute-version.outputs.version }}