Skip to content

Commit

Permalink
Improve ci (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw authored Nov 30, 2024
1 parent dfa767e commit f503b9a
Show file tree
Hide file tree
Showing 13 changed files with 246 additions and 291 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @pavelzw
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
dependencies:
patterns:
- "*"
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ jobs:
uses: actions/checkout@v4
- name: Set up pixi
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
- name: Link packages
- name: Use local package
run: |
mkdir -p ~/.local/share/typst/packages/preview/moderner-cv
ln -s $(pwd) ~/.local/share/typst/packages/preview/moderner-cv/0.1.0
sed -i 's/#import .*/#import "..\/lib.typ": */' template/example.typ
- name: compile
run: pixi run compile
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
path: template/example.pdf
if-no-files-found: error
36 changes: 36 additions & 0 deletions .github/workflows/update-lockfiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update lockfiles

permissions:
contents: write
pull-requests: write

on:
workflow_dispatch:
schedule:
- cron: 0 5 1 * *

jobs:
pixi-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up pixi
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1
with:
run-install: false
- name: Update lockfiles
run: |
set -euo pipefail
pixi update --json --no-install | pixi exec pixi-diff-to-markdown >> diff.md
- name: Create pull request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update pixi lockfile
title: Update pixi lockfile
body-path: diff.md
branch: update-pixi
base: main
labels: pixi
delete-branch: true
add-paths: pixi.lock
38 changes: 26 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# moderner-cv

[![License][license-badge]][license]
[![CI][ci-badge]][ci]
[![Latest release][latest-release-badge]][typst-universe]

[license-badge]: https://img.shields.io/github/license/pavelzw/moderner-cv?style=flat-square
[license]: ./LICENSE
[ci-badge]: https://img.shields.io/github/actions/workflow/status/pavelzw/moderner-cv/ci.yml?style=flat-square
[ci]: https://github.com/pavelzw/moderner-cv/actions/
[latest-release-badge]: https://img.shields.io/github/v/tag/pavelzw/moderner-cv?style=flat-square&label=latest&sort=semver
[typst-universe]: https://typst.app/universe/package/moderner-cv

This is a typst adaptation of LaTeX's [moderncv](https://github.com/moderncv/moderncv), a modern curriculum vitae class.

## Requirements
Expand All @@ -8,10 +19,20 @@ This template uses FontAwesome icons via the [fontawesome typst package](https:/
In order to properly use it, you need to have fontawesome installed on your system or have typst configured (via `--font-path`) to use the fontawesome font files.
You can download fontawesome [here](https://fontawesome.com/download).

> [!TIP]
> You can use typst in combination with [pixi](https://pixi.sh) to easily add fontawesome to your project and run it reproducibly anywhere.
>
> ```toml
> [dependencies]
> typst = ">=0.12.0"
> typstyle = ">=0.12"
> font-otf-fontawesome = "*"
> ```
## Usage
```typst
#import "@preview/moderner-cv:0.1.0": *
#import "@preview/moderner-cv:0.1.1": *
#show: moderner-cv.with(
name: "Jane Doe",
Expand All @@ -20,6 +41,9 @@ You can download fontawesome [here](https://fontawesome.com/download).
email: "jane.doe@example.com",
github: "jane-doe",
linkedin: "jane-doe",
// custom socials: (icon, link, body)
// any fontawesome icon can be used: https://fontawesome.com/search
website: ("link", "https://example.me", "example.me"),
),
)
Expand All @@ -33,14 +57,4 @@ You can download fontawesome [here](https://fontawesome.com/download).
## Building and Testing Locally

To build and test the template locally, you can run `pixi run watch` in the root of this repository.
Please ensure to have linked this package to your local typst packages, see [here](https://github.com/typst/packages#local-packages):

```bash
# linux
mkdir -p ~/.local/share/typst/packages/preview/moderner-cv
ln -s $(pwd) ~/.local/share/typst/packages/preview/moderner-cv/0.1.0

# macos
mkdir -p ~/Library/Application\ Support/typst/packages/preview/moderner-cv
ln -s $(pwd) ~/Library/Application\ Support/typst/packages/preview/moderner-cv/0.1.0
```
Please ensure to use the version of moderner-cv that is in this repository instead of the one on the typst universe by temporarily changing the import in [`example.typ`](./template/example.typ) to `#import "../lib.typ": *`.
Binary file modified assets/example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
165 changes: 0 additions & 165 deletions fonts/Font Awesome 6/LICENSE.txt

This file was deleted.

Loading

0 comments on commit f503b9a

Please sign in to comment.