Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 39 additions & 14 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,30 @@ on:
# branches: [master]
pull_request:

workflow_dispatch:

permissions:
contents: write
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
build:
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.5.2
steps:
- uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: 'latest'
- name: Install mdBook
run: |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
rustup update
cargo install --version ${MDBOOK_VERSION} mdbook

- name: Set up PureScript toolchain
uses: purescript-contrib/setup-purescript@main
Expand All @@ -31,13 +42,27 @@ jobs:
echo -e "PureScript v$version\n" >> README.md
echo -e "Published on $today" >> README.md

- run: mdbook build
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/ja'
# if: github.ref == 'refs/heads/master'
- name: Build with mdBook
run: mdbook build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book
# cname: book.purescript.org
path: ./book

deploy:
if: github.ref == 'refs/heads/ja'
# if: github.ref == 'refs/heads/master'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ src = "text-ja"
title = "実例によるPureScript"

[output.html]
git-repository-url = "https://github.com/gemmaro/purescript-book"
git-repository-url = "https://github.com/purs-jp/purescript-book"
mathjax-support = true
2 changes: 1 addition & 1 deletion translation/po/ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: com.github.gemmaro.purescript-book.v0.1.0\n"
"Project-Id-Version: com.github.purs-jp.purescript-book.v0.1.0\n"
"POT-Creation-Date: 2024-08-05 08:18+0900\n"
"PO-Revision-Date: 2024-08-05 08:25+0900\n"
"Last-Translator: gemmaro <gemmaro.dev@gmail.com>\n"
Expand Down