Skip to content

Commit cdabbed

Browse files
committed
Avoid github-pages to interpret curly brackets
GH Pages / Jekyll use curly brackets as Liquid templates placeholders. We don't want them interpreted that way within various examples in the documentation but, instead, show them raw. Also, we put them within an HTML comment, so they won't show in regular Markdown display.
1 parent 955e665 commit cdabbed

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

docs/CodeCoverage.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Some examples follow:
4848

4949
#### GitHub Actions
5050

51+
<!-- {% raw %} -->
5152
```yaml
5253
- name: PHPUnit tests
5354
if: ${{ always() }}
@@ -57,6 +58,8 @@ Some examples follow:
5758
env:
5859
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5960
```
61+
<!-- {% endraw %} -->
62+
6063
Note that, instead of the automatically generated for every run `${{ secrets.GITHUB_TOKEN }}` token you can use any other GitHub token (PAT...) with the correct perms or, also, the token that Coveralls offers to you for every repository. Just it's easier to use the automatic GitHub one, because that way you don't need to create tokens or secrets manually and maintain them.
6164

6265
#### Travis

docs/GHAFileExplained.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ the new syntax, also you may find this [migration
1313
manual](https://docs.github.com/en/actions/learn-github-actions/migrating-from-travis-ci-to-github-actions)
1414
useful.
1515

16+
<!-- {% raw %} -->
1617
```yaml
1718
# Title of the workflow
1819
name: Moodle Plugin CI
@@ -175,3 +176,4 @@ jobs:
175176
if: ${{ always() }}
176177
run: moodle-plugin-ci behat --profile chrome
177178
```
179+
<!-- {% endraw %} -->

docs/IgnoringFiles.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ in your CI workflow file. These environment variables wont work for Grunt tasks
1616

1717
`.github/workflow/*` example:
1818

19+
<!-- {% raw %} -->
1920
```yaml
2021
- name: Install moodle-plugin-ci
2122
run: |
@@ -26,6 +27,7 @@ in your CI workflow file. These environment variables wont work for Grunt tasks
2627
IGNORE_PATHS: 'vendor/widget,javascript/min-lib.js'
2728
IGNORE_NAMES: '*-m.js,bad_lib.php'
2829
```
30+
<!-- {% endraw %} -->
2931
3032
`.travis.yml` example:
3133

@@ -50,6 +52,7 @@ variable names are the same as above, but prefixed with `COMMANDNAME_`.
5052

5153
`.github/workflow/*` example:
5254

55+
<!-- {% raw %} -->
5356
```yaml
5457
- name: Install moodle-plugin-ci
5558
run: |
@@ -61,6 +64,7 @@ variable names are the same as above, but prefixed with `COMMANDNAME_`.
6164
CODECHECKER_IGNORE_NAMES: '*-m.js,bad_lib.php'
6265
MUSTACHE_IGNORE_NAMES: 'broken.mustache'
6366
```
67+
<!-- {% endraw %} -->
6468

6569
`.travis.yml` example:
6670

docs/UPGRADE-4.0.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Despite our recommendations, if you still want to run both versions in the same
5454

5555
For example, for GitHub Actions, it can be setup as follows:
5656

57+
<!-- {% raw %} -->
5758
```yaml
5859
# WARNING - this is only a partial example,
5960
# several steps were excluded to keep it simple!
@@ -83,12 +84,13 @@ For example, for GitHub Actions, it can be setup as follows:
8384
...
8485
- name: Initialise moodle-plugin-ci
8586
run: |
86-
// Apply here for the configured plugin-ci version.
87+
# Apply here for the configured plugin-ci version.
8788
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ${{ matrix.plugin-ci }}
8889
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
8990
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
9091
...
9192
...
9293
```
94+
<!-- {% endraw %} -->
9395
9496
The same can be also implemented for Travis CI jobs, adding the `plugin-ci` version as one more element in the jobs matrix `env` element.

0 commit comments

Comments
 (0)