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] 3592f7bc32
build(deps): bump actions/deploy-pages from 1 to 4 (#1629)
Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages)
from 1 to 4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/deploy-pages/releases">actions/deploy-pages's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h1>Changelog</h1>
<ul>
<li>Deploy pages using artifact IDs <a
href="https://github.com/konradpabjan"><code>@​konradpabjan</code></a>
(<a
href="https://redirect.github.com/actions/deploy-pages/issues/251">#251</a>)</li>
<li>This version requires the permission <code>actions: read</code> in
the workflows which use it.</li>
</ul>
<hr />
<p>ℹ️ This version of <code>actions/deploy-pages</code> is
<strong>ONLY</strong> compatible with artifacts uploaded by either:</p>
<ul>
<li><a
href="https://github.com/actions/upload-pages-artifact/releases/tag/v3.0.0"><code>actions/upload-pages-artifact@v3</code></a>
or newer</li>
<li><a
href="https://github.com/actions/upload-artifact/releases/tag/v4.0.0"><code>actions/upload-artifact@v4</code></a>
or newer.</li>
</ul>
<p>See details of <a
href="https://github.com/actions/deploy-pages/compare/v3.0.1...v4.0.0">all
code changes</a> since previous release.</p>
<p>⚠️ For use with products other than GitHub.com, such as GitHub
Enterprise Server, please consult the <a
href="https://github.com/actions/deploy-pages/#compatibilty">compatibility
table</a>.</p>
<h2>v3.0.1</h2>
<h1>Changelog</h1>
<ul>
<li>Bump eslint from 8.54.0 to 8.55.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/deploy-pages/issues/266">#266</a>)</li>
<li>Bump nock from 13.3.8 to 13.4.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/deploy-pages/issues/267">#267</a>)</li>
<li>Bump eslint-config-prettier from 9.0.0 to 9.1.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/deploy-pages/issues/268">#268</a>)</li>
<li>Bump <code>@​actions/core</code> from 1.10.0 to 1.10.1 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/deploy-pages/issues/269">#269</a>)</li>
<li>Bump <code>@​actions/github</code> from 5.1.1 to 6.0.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/deploy-pages/issues/261">#261</a>)</li>
<li>Update compatibility table for v3 <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/deploy-pages/issues/270">#270</a>)</li>
</ul>
<h2>🧰 Maintenance</h2>
<ul>
<li>chore/docs: update version, fix typos <a
href="https://github.com/kbdharun"><code>@​kbdharun</code></a> (<a
href="https://redirect.github.com/actions/deploy-pages/issues/272">#272</a>)</li>
</ul>
<hr />
<p>See details of <a
href="https://github.com/actions/deploy-pages/compare/v3.0.0...v3.0.1">all
code changes</a> since previous release.</p>
<p>⚠️ For use with products other than GitHub.com, such as GitHub
Enterprise Server, please consult the <a
href="https://github.com/actions/deploy-pages/#compatibilty">compatibility
table</a>.</p>
<h2>v3.0.0</h2>
<h1>Changelog</h1>
<ul>
<li>Update action to node20 <a
href="https://github.com/takost"><code>@​takost</code></a> (<a
href="https://redirect.github.com/actions/deploy-pages/issues/256">#256</a>)</li>
</ul>
<hr />
<p>See details of <a
href="https://github.com/actions/deploy-pages/compare/v2.0.5...v3.0.0">all
code changes</a> since previous release.</p>
<p>⚠️ For use with products other than GitHub.com, such as GitHub
Enterprise Server, please consult the <a
href="https://github.com/actions/deploy-pages/#compatibilty">compatibility
table</a>.</p>
<h2>v2.0.5</h2>
<h1>Changelog</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7a9bd943aa"><code>7a9bd94</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/deploy-pages/issues/290">#290</a>
from actions/dependabot/npm_and_yarn/undici-6.2.1</li>
<li><a
href="eee8a27158"><code>eee8a27</code></a>
Update distributables after Dependabot 🤖</li>
<li><a
href="b6e5c85160"><code>b6e5c85</code></a>
Bump undici from 6.0.1 to 6.2.1</li>
<li><a
href="b8d2528df3"><code>b8d2528</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/deploy-pages/issues/282">#282</a>
from actions/dependabot/github_actions/github/codeql-...</li>
<li><a
href="53d1eac7fd"><code>53d1eac</code></a>
Bump github/codeql-action from 2 to 3</li>
<li><a
href="3f0ef9d75d"><code>3f0ef9d</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/deploy-pages/issues/281">#281</a>
from actions/dependabot/github_actions/actions/upload...</li>
<li><a
href="82751044df"><code>8275104</code></a>
Bump actions/upload-artifact from 3 to 4</li>
<li><a
href="9be9d731c9"><code>9be9d73</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/deploy-pages/issues/280">#280</a>
from actions/dependabot/npm_and_yarn/eslint-8.56.0</li>
<li><a
href="d8afefafec"><code>d8afefa</code></a>
Bump eslint from 8.55.0 to 8.56.0</li>
<li><a
href="304d0b77f8"><code>304d0b7</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/deploy-pages/issues/277">#277</a>
from actions/dependabot/github_actions/actions/publis...</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/deploy-pages/compare/v1...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/deploy-pages&package-manager=github_actions&previous-version=1&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:53:30 +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@v4