1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-17 07:11:27 +02:00
comprehensive-rust/.github/workflows/publish.yml
dependabot[bot] d4748e12d3
build(deps): bump actions/configure-pages from 2 to 4 (#1620)
Bumps
[actions/configure-pages](https://github.com/actions/configure-pages)
from 2 to 4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/configure-pages/releases">actions/configure-pages's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h1>Changelog</h1>
<ul>
<li>Use a centralized <code>.node-version</code> file <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/configure-pages/issues/117">#117</a>)</li>
<li>Update action to node20 <a
href="https://github.com/takost"><code>@​takost</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/108">#108</a>)</li>
</ul>
<p>See details of <a
href="https://github.com/actions/configure-pages/compare/v3.0.7...v4.0.0">all
code changes</a> since previous release.</p>
<h2>v3.0.7</h2>
<h1>Changelog</h1>
<ul>
<li>Update Actions workflows to use Node 20.x <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/configure-pages/issues/116">#116</a>)</li>
<li>Bump eslint-plugin-github from 4.7.0 to 4.10.1 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/114">#114</a>)</li>
<li>Bump word-wrap from 1.2.3 to 1.2.5 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/113">#113</a>)</li>
<li>Bump jest from 29.5.0 to 29.7.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/112">#112</a>)</li>
<li>Bump <code>@​babel/traverse</code> from 7.21.3 to 7.23.5 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/110">#110</a>)</li>
<li>Bump espree from 9.5.2 to 9.6.1 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/111">#111</a>)</li>
<li>Bump eslint from 8.38.0 to 8.40.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/93">#93</a>)</li>
</ul>
<p>See details of <a
href="https://github.com/actions/configure-pages/compare/v3.0.6...v3.0.7">all
code changes</a> since previous release.</p>
<h2>v3.0.6</h2>
<h1>Changelog</h1>
<ul>
<li>Bump eslint from 8.36.0 to 8.38.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/89">#89</a>)</li>
<li>Bump eslint-plugin-github from 4.6.1 to 4.7.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/86">#86</a>)</li>
<li>Bump eslint-config-prettier from 8.7.0 to 8.8.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/85">#85</a>)</li>
<li>Bump prettier from 2.8.6 to 2.8.7 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/84">#84</a>)</li>
<li>Make &quot;Get Pages failed&quot; error message more helpful <a
href="https://github.com/WofWca"><code>@​WofWca</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/83">#83</a>)</li>
<li>Bump prettier from 2.8.4 to 2.8.6 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/81">#81</a>)</li>
<li>Add a CodeQL security scanning workflow <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/configure-pages/issues/68">#68</a>)</li>
</ul>
<p>See details of <a
href="https://github.com/actions/configure-pages/compare/v3.0.5...v3.0.6">all
code changes</a> since previous release.</p>
<h2>v3.0.5</h2>
<h1>Changelog</h1>
<ul>
<li>Bump jest from 29.4.3 to 29.5.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/77">#77</a>)</li>
<li>Bump eslint from 8.35.0 to 8.36.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/76">#76</a>)</li>
<li>Bump espree from 9.4.1 to 9.5.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/78">#78</a>)</li>
<li>Bump eslint-config-prettier from 8.6.0 to 8.7.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/75">#75</a>)</li>
<li>Bump eslint from 8.34.0 to 8.35.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/73">#73</a>)</li>
<li>Bump jest from 29.4.1 to 29.4.3 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/72">#72</a>)</li>
<li>Bump eslint-plugin-github from 4.6.0 to 4.6.1 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/71">#71</a>)</li>
<li>Amend token coverage for enablement in Action metadata file <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/configure-pages/issues/51">#51</a>)</li>
</ul>
<p>See details of <a
href="https://github.com/actions/configure-pages/compare/v3.0.4...v3.0.5">all
code changes</a> since previous release.</p>
<h2>v3.0.4</h2>
<h1>Changelog</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1f0c5cde4b"><code>1f0c5cd</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/configure-pages/issues/117">#117</a>
from actions/use-node-version-file</li>
<li><a
href="591bb0deb9"><code>591bb0d</code></a>
Merge branch 'main' into use-node-version-file</li>
<li><a
href="1465f012e6"><code>1465f01</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/configure-pages/issues/108">#108</a>
from takost/update-to-node-20</li>
<li><a
href="f2fc553133"><code>f2fc553</code></a>
Merge branch 'main' into update-to-node-20</li>
<li><a
href="373694e352"><code>373694e</code></a>
Use a centralized .node-version file</li>
<li><a
href="b8130d9ab9"><code>b8130d9</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/configure-pages/issues/116">#116</a>
from actions/node-20-workflows</li>
<li><a
href="ffbbfa5ad0"><code>ffbbfa5</code></a>
Update Actions workflows to use Node 20.x</li>
<li><a
href="18b91e4096"><code>18b91e4</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/configure-pages/issues/114">#114</a>
from actions/dependabot/npm_and_yarn/eslint-plugin-gi...</li>
<li><a
href="35974f9c62"><code>35974f9</code></a>
Bump eslint-plugin-github from 4.7.0 to 4.10.1</li>
<li><a
href="17db653bf9"><code>17db653</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/configure-pages/issues/113">#113</a>
from actions/dependabot/npm_and_yarn/word-wrap-1.2.5</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/configure-pages/compare/v2...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/configure-pages&package-manager=github_actions&previous-version=2&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-01 22:40:05 +01:00

83 lines
2.5 KiB
YAML

name: Publish
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
# Update the language picker in index.hbs to link new languages.
LANGUAGES: bn da de es fa fr it ja ko pt-BR zh-CN zh-TW
jobs:
publish:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# We need the full history below.
fetch-depth: 0
- name: Setup Rust cache
uses: ./.github/workflows/setup-rust-cache
- name: Install mdbook
uses: ./.github/workflows/install-mdbook
- name: Build course in English
run: mdbook build -d book
- name: Zip exercise templates
run: cd book/exerciser && zip --recurse-paths ../html/comprehensive-rust-exercises.zip comprehensive-rust-exercises/
- name: Build all translations
run: |
for po_lang in ${{ env.LANGUAGES }}; do
POT_CREATION_DATE=$(grep --max-count 1 '^"POT-Creation-Date:' po/$po_lang.po | sed -E 's/".*: (.*)\\n"/\1/')
if [[ $POT_CREATION_DATE == "" ]]; then
POT_CREATION_DATE=now
fi
echo "::group::Building $po_lang translation as of $POT_CREATION_DATE"
rm -r src/
git restore --source "$(git rev-list -n 1 --before "$POT_CREATION_DATE" @)" src/
# Set language and adjust site URL. Clear the redirects
# since they are in sync with the source files, not the
# translation.
MDBOOK_BOOK__LANGUAGE=$po_lang \
MDBOOK_OUTPUT__HTML__SITE_URL=/comprehensive-rust/$po_lang/ \
MDBOOK_OUTPUT__HTML__REDIRECT='{}' \
mdbook build -d book/$po_lang
(cd book/$po_lang/exerciser && zip --recurse-paths ../html/comprehensive-rust-exercises.zip comprehensive-rust-exercises/)
mv book/$po_lang/html book/html/$po_lang
echo "::endgroup::"
done
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: book/html
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1