You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(ci): Use actions/deploy-pages for Cargo Contributor Guide deployment (#16876)
This replaces the `gh-pages` git branch deployment with the official
`actions/upload-pages-artifact` and `actions/deploy-pages` actions.
It requires changing the repository's Pages settings from "Deploy from a
branch" to "GitHub Actions" as described also in
rust-lang/rfcs#3419, which has used a similar
setup for a while now.
I've tested the `build` job in my forked repo and verified that the
artifact contents match the current content of the `gh-pages` branch. I
did not test the `deploy` job with my fork repo, but since it is the
same as in e.g. the `rfcs` repo I don't expect any issues from that.
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
30
26
echo `pwd`/mdbook >> $GITHUB_PATH
31
-
- name: Deploy docs
27
+
- name: Build
32
28
run: |
33
29
GENERATE_PY="$(pwd)/ci/generate.py"
34
30
35
31
cd src/doc/contrib
36
32
mdbook build
37
33
38
-
# Override previous ref to avoid keeping history.
39
-
git worktree add --orphan -B gh-pages gh-pages
40
-
git config user.name "Deploy from CI"
41
-
git config user.email ""
34
+
mkdir gh-pages
42
35
cd gh-pages
43
36
mv ../book contrib
44
-
git add contrib
45
37
46
38
# Generate HTML for link redirections.
47
39
python3 "$GENERATE_PY"
48
-
git add *.html
49
-
# WARN: The CNAME file is for GitHub to redirect requests to the custom domain.
50
-
# Missing this may entail security hazard and domain takeover.
51
-
# See <https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#securing-your-custom-domain>
# WARN: The CNAME file is for GitHub to redirect requests to the custom domain.
43
-
# Missing this may entail security hazard and domain takeover.
44
-
# See <https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#securing-your-custom-domain>
0 commit comments