-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (72 loc) · 2.43 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Deploy
on:
push:
branches:
- main
jobs:
ci:
uses: ./.github/workflows/ci.yml
build-and-deploy:
permissions:
contents: write
pages: write
id-token: write
runs-on: ubuntu-latest
needs: ci
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
# prepare nix
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
# for Org-Zenn to Markdown
- name: Build org to markdown
run: nix develop .#deploy --command bash -c "emacs --batch --load scripts/ox-zenn.el --funcall export-org-zenn-files"
- name: Deploy Zenn
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./zenn
publish_branch: zenn
force_orphan: true
# for Org-Roam to Markdown
- name: Remove gpg file
run: rm -fr org/private
- name: Build org to markdown
run: nix develop .#deploy --command bash -c "emacs --batch --load scripts/ox-roam.el --funcall export-org-roam-files"
# for Generate OGP
- name: Create public
run: mkdir -p ./public
- name: Generate OGP
run: nix develop .#deploy --command bash -c "tcardgen --fontDir=tcardgen/font --output=static/ogp --config=tcardgen/ogp.yml content/posts/**/*.md"
# for Hugo
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: nix develop .#deploy --command bash -c "hugo --minify"
# for PDF
- name: Generate example-slide
run: |
nix build ./typst#example-slide
cp result/example-slide.pdf public/pdf/
- name: Generate phperkaigi-2025-pamphlet
run: |
nix build ./typst#phperkaigi-2025-pamphlet
cp result/phperkaigi-2025-pamphlet.pdf public/pdf/
- name: Generate phpcon-nagoya-2025
run: |
nix build ./typst#phpcon-nagoya-2025
cp result/phpcon-nagoya-2025.pdf public/pdf/
# for GitHub Pages
- name: Setup GitHub Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v3