-
-
Notifications
You must be signed in to change notification settings - Fork 92
Fix GitHub Pages workflow #275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 26 commits
8a7439e
eb07258
dc35b6a
b95d8d7
2c47f0b
0246774
323d53e
7224385
1dae517
f0ca2ad
ebf1d88
95f81d5
19f9ff1
381f8f3
5457c00
517005a
991677f
8118b7c
576d3d8
608565c
49f6799
c61849d
f60fd95
0e35f56
03bca62
deb3890
28bd57d
c998b10
027211c
88281ce
625dc32
65899cb
2fe51d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,3 +12,6 @@ trim_trailing_whitespace = true | |
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = false | ||
|
|
||
| [*.yml] | ||
| indent_size = 2 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Deploy Jekyll with GitHub Pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["master"] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: 3.4.8 | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| gem install bundler | ||
| bundle install | ||
|
|
||
| - name: Build site | ||
| run: bundle exec jekyll build -d ./_site | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v4 | ||
|
|
||
| deploy: | ||
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| source "https://rubygems.org" | ||
|
|
||
| ruby "3.4.8" | ||
|
|
||
| gem "jekyll", "~> 4.4.1" | ||
| gem "minima", "~> 2.5.2" | ||
|
|
||
| group :jekyll_plugins do | ||
| gem "jekyll-seo-tag", "~> 2.8.0" | ||
| gem "jekyll-optional-front-matter", "~> 0.3.2" | ||
| gem "jekyll-readme-index", "~> 0.3.0" | ||
| gem "jekyll-relative-links", "~> 0.7.0" | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| defaults: | ||
| - scope: | ||
| path: "" | ||
| values: | ||
| layout: "default" | ||
| baseurl: "/docs" | ||
| theme: minima | ||
| relative_links: | ||
| enabled: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="{{ page.lang | default: site.lang | default: " en" }}"> | ||
|
|
||
| {%- include head.html -%} | ||
|
|
||
| <body> | ||
|
|
||
| {%- include header.html -%} | ||
|
|
||
| <main class="page-content" aria-label="Content"> | ||
| <div class="wrapper"> | ||
| {{ content }} | ||
| </div> | ||
| </main> | ||
|
|
||
| {%- include footer.html -%} | ||
|
|
||
| <script type="module"> | ||
| import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs'; | ||
| mermaid.initialize({startOnLoad: false}); | ||
| mermaid.run({ | ||
| querySelector: 'code.language-mermaid' | ||
| }); | ||
| </script> | ||
|
|
||
| </body> | ||
|
|
||
| </html> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: PACKAGE VERSION\n" | ||
| "POT-Creation-Date: 2025-10-19 11:32+0000\n" | ||
| "POT-Creation-Date: 2025-12-20 13:19+0000\n" | ||
| "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
| "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
| "Language-Team: LANGUAGE <[email protected]>\n" | ||
|
|
@@ -47,9 +47,8 @@ msgstr "" | |
| #. type: Plain text | ||
| #: ../../guide/en/start/workflow.md | ||
| msgid "" | ||
| "The installed application has only the homepage, which displays when you " | ||
| "access the URL `http://localhost/`. It shares a common layout that you can " | ||
| "reuse on further pages." | ||
| "The installed application contains only one page, accessible at `http://" | ||
| "localhost/`. It shares a common layout that you can reuse on further pages." | ||
| msgstr "" | ||
|
|
||
| #. type: Plain text | ||
|
|
@@ -165,9 +164,24 @@ msgstr "" | |
| msgid "The following diagram shows how an application handles a request." | ||
| msgstr "" | ||
|
|
||
| #. type: Plain text | ||
| #. type: Fenced code block (mermaid) | ||
| #: ../../guide/en/start/workflow.md | ||
| msgid "" | ||
| #, no-wrap | ||
| msgid "" | ||
| "flowchart LR\n" | ||
| " user[User's client] --> index\n" | ||
| " index[index.php] --> DI[Initialize Dependency Container]\n" | ||
| " config[configs] -.-> DI\n" | ||
| " DI --> RequestFactory[RequestFactory]\n" | ||
| " RequestFactory -->|Request| app[Application]\n" | ||
| " app -->|Request| middleware[Middleware]\n" | ||
| " middleware -->|Request| router[Router]\n" | ||
| " router -->|Request| action[Action Handler]\n" | ||
| " action -->|Response| emitter[SapiEmitter]\n" | ||
| " router -->|Response| emitter\n" | ||
| " middleware -->|Response| emitter\n" | ||
| " app -->|Response| emitter\n" | ||
| " emitter --> user\n" | ||
| msgstr "" | ||
|
|
||
| #. type: Bullet: '1. ' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| --- | ||
| render_with_liquid: false | ||
|
||
| --- | ||
|
|
||
| # Deploying Yii applications to Docker Swarm | ||
|
Check notice on line 5 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| This guide walks you through deploying a Yii application to Docker Swarm from a blank server, using Caddy as a reverse proxy and a container registry (Forgejo or Gitea). | ||
|
|
||
|
|
@@ -17,7 +21,7 @@ | |
|
|
||
| ## Prerequisites | ||
|
|
||
| - A server with a fresh installation of a Linux distribution (Ubuntu 22.04 LTS or later recommended) | ||
|
Check notice on line 24 in cookbook/en/deployment/docker-swarm.md
|
||
| - A domain name pointing to your server's IP address | ||
| - SSH access to your server | ||
| - Basic knowledge of Docker and command-line tools | ||
|
|
@@ -28,7 +32,7 @@ | |
|
|
||
| For installation instructions, see the [official Docker documentation](https://docs.docker.com/engine/install/ubuntu/). | ||
|
|
||
| ### Initialize Docker Swarm | ||
|
Check notice on line 35 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| Initialize your server as a Docker Swarm manager: | ||
|
|
||
|
|
@@ -50,7 +54,7 @@ | |
|
|
||
| You need a container registry to store your Docker images. Choose one of the following options. | ||
|
|
||
| ### Option 1: Using Forgejo | ||
|
Check notice on line 57 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| Deploy Forgejo as a container registry. | ||
|
|
||
|
|
@@ -91,7 +95,7 @@ | |
|
|
||
| After deployment, access Forgejo at `https://git.example.com` and complete the initial setup. Make sure to enable the container registry in the settings. | ||
|
|
||
| ### Option 2: Using Gitea | ||
|
Check notice on line 98 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| Deploy Gitea as a container registry. | ||
|
|
||
|
|
@@ -167,10 +171,10 @@ | |
| docker stack deploy -c caddy-stack.yml caddy | ||
| ``` | ||
|
|
||
| Caddy automatically discovers services with Caddy labels and sets up HTTPS using Let's Encrypt. | ||
|
Check warning on line 174 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| > [!IMPORTANT] | ||
| > Make sure your domain DNS records are configured and pointing to your server before deploying services with Caddy labels, as Let's Encrypt requires domain validation. | ||
|
Check notice on line 177 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| ## Alternative: Using Traefik as reverse proxy | ||
|
|
||
|
|
@@ -236,9 +240,9 @@ | |
| - "traefik.http.services.app.loadbalancer.server.port=80" | ||
| ``` | ||
|
|
||
| ## Configuring your Yii application | ||
|
Check notice on line 243 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| ### Update the Makefile configuration | ||
|
Check notice on line 245 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| The [Yii application template](https://github.com/yiisoft/app) includes a Makefile with deployment commands. Update the `docker/.env` file in your project: | ||
|
|
||
|
|
@@ -258,7 +262,7 @@ | |
|
|
||
| Replace the values: | ||
| - `STACK_NAME`: A unique name for your application stack | ||
| - `PROD_HOST`: The domain name where your app will be accessible | ||
|
Check notice on line 265 in cookbook/en/deployment/docker-swarm.md
|
||
| - `PROD_SSH`: SSH connection string to your server (format: `ssh://user@host`) | ||
| - `IMAGE`: Full path to your container image in the registry | ||
| - `IMAGE_TAG`: Image tag, typically `latest` or a version number | ||
|
|
@@ -330,7 +334,7 @@ | |
| - Uses a rolling update strategy with automatic rollback on failure | ||
| - Configures `labels` for automatic HTTPS on the reverse proxy | ||
| - Disables obtaining of HTTPs certificates on the container itself | ||
| since proxy communicates with the container via HTTP. That is `auto_https off`. | ||
|
Check failure on line 337 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| If you need a database, add it to the stack: | ||
|
|
||
|
|
@@ -416,9 +420,9 @@ | |
| docker push ${IMAGE}:${IMAGE_TAG} | ||
| ``` | ||
|
|
||
| ## Deploying to Docker Swarm | ||
|
Check notice on line 423 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| ### Configure SSH access | ||
|
Check notice on line 425 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| Set up SSH key-based authentication to your server: | ||
|
|
||
|
|
@@ -558,7 +562,7 @@ | |
|
|
||
| ### Set up a firewall | ||
|
|
||
| Configure UFW (Uncomplicated Firewall) on your server: | ||
|
Check notice on line 565 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| ```bash | ||
| # Allow SSH | ||
|
|
@@ -580,7 +584,7 @@ | |
|
|
||
| ### Keep the system updated | ||
|
|
||
| Regularly update your server and Docker: | ||
|
Check warning on line 587 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| ```bash | ||
| # Update system packages | ||
|
|
@@ -603,15 +607,15 @@ | |
|
|
||
| Common issues: | ||
| - **Image pull errors**: Verify registry authentication with `docker -H ssh://docker-web login` | ||
| - **Port conflicts**: Ensure no other services are using ports 80/443 | ||
|
Check notice on line 610 in cookbook/en/deployment/docker-swarm.md
|
||
| - **Resource constraints**: Check available resources with `docker -H ssh://docker-web node ls` | ||
|
|
||
| ### SSL certificate issues | ||
|
Check warning on line 613 in cookbook/en/deployment/docker-swarm.md
|
||
|
|
||
| If Caddy/Traefik can't obtain certificates: | ||
| - Verify DNS is pointing to your server | ||
|
Check notice on line 616 in cookbook/en/deployment/docker-swarm.md
|
||
| - Check that ports 80 and 443 are accessible from the internet | ||
|
Check notice on line 617 in cookbook/en/deployment/docker-swarm.md
|
||
| - Ensure the email in the Let's Encrypt configuration is valid | ||
|
Check notice on line 618 in cookbook/en/deployment/docker-swarm.md
|
||
| - Check logs: `docker -H ssh://docker-web service logs caddy` or `traefik_traefik` | ||
|
|
||
| ### Container registry connection issues | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
render_with_liquid: falseconfiguration has been removed from_config.yml. However, this setting was likely intentional to prevent Jekyll/Liquid from processing Markdown files that contain Twig syntax (which uses similar{{ }}and{% %}delimiters). Removing this setting means Jekyll will now try to process all Liquid-like syntax in the documentation.While the PR adds
{% raw %}tags to one specific code block intemplate-engines.md, there are multiple other Twig code blocks in the same file (lines 19-43, 49-55, 75-87, 90-99) that also contain Liquid-like syntax but are NOT wrapped in{% raw %}tags. These will now be processed by Jekyll and potentially cause build errors or incorrect rendering.Either the
render_with_liquid: falsesetting should be kept, or ALL Twig code blocks throughout the documentation need to be wrapped with{% raw %}/{% endraw %}tags.