Skip to content

docs: dp.md

docs: dp.md #87

Workflow file for this run

name: CI/CD
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v5
id: pages
latex:
if: ${{ contains(github.event.head_commit.modified, 'cv/') }}
uses: ./.github/workflows/latex.yml
build:
runs-on: ubuntu-latest
needs: latex
if: ${{ !failure() && !cancelled() }}
env:
HUGO_VERSION: 0.115.4
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass Embedded
run: sudo snap install dart-sass-embedded
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci && npm run build || true"
- name: Restore CV
uses: actions/cache/restore@v4
with:
path: ./static/cv.pdf
key: ${{ runner.os }}-CV-${{ hashFiles('**/*.tex', '**/*.cls') }}
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs:
- setup
- build
if: ${{ !failure() && !cancelled() }}
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
id: deployment