Deploy to d120.de on main push #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | ||
name: Build | ||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push events for all branches | ||
push: | ||
branches: [ main, master ] | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build_latex" | ||
build_latex: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/tudalgo/algotex:latest | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# 1. Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Set up Git repository | ||
uses: actions/checkout@v3 | ||
# 2. Link texmf folder to the current texmf home | ||
- name: Link texmf folder to the current texmf home | ||
run: | | ||
ln -s /root/texmf $(kpsewhich -var-value=TEXMFHOME) | ||
texhash --verbose | ||
# 3. Build the documents | ||
- name: "Build the documents" | ||
run: | | ||
make -j $(nproc) -C lecture | ||
mv lecture/pdfout pdfout | ||
# 4. Upload artifacts to GitHub | ||
- name: Upload artifacts to GitHub | ||
if: ${{ !env.ACT }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Vorkurs-Folien | ||
path: "pdfout/*.pdf" | ||
if-no-files-found: error | ||
# 9. Get Date | ||
# - name: Get current date | ||
# id: date | ||
# run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M-%S.%N')" | ||
#10 create a release | ||
# - name: Create a release | ||
# if: ${{ github.ref == 'refs/heads/main' && !env.ACT && github.repository == 'd120/vorkurs' }} | ||
# uses: softprops/action-gh-release@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# tag_name: snapshot-${{ steps.date.outputs.date }} | ||
# name: snapshot-release-${{ steps.date.outputs.date }} | ||
# files: "pdfout/*.pdf" | ||
# fail_on_unmatched_files: true | ||
# draft: false | ||
# prerelease: false | ||
# | ||
deploy: | ||
if: ${{ github.event_name == 'push' }} | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
needs: build | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# save the pdf file from the previous workflow | ||
- name: Save pdf file | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: . | ||
name: PDF | ||
- name: Get branch name | ||
run: echo ${{ github.ref_name }} | ||
- run: find |