Skip to content

Update

Update #477

Workflow file for this run

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