Skip to content

Commit 7aa25d5

Browse files
authored
gh-pages action: add id-token write permission (#1265)
* gh-pages action: add id-token write permission * gh-pages action: add environment
1 parent 0aca902 commit 7aa25d5

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/gh-pages.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: gh-pages
22

3+
permissions:
4+
contents: read
5+
pages: write
6+
id-token: write
7+
38
on:
49
push:
510
branches:
@@ -9,23 +14,33 @@ jobs:
914
deploy:
1015
name: GH-pages documentation
1116
runs-on: ubuntu-latest
17+
environment:
18+
name: github-pages
19+
url: https://rust-random.github.io/rand/
20+
1221
steps:
13-
- uses: actions/checkout@v3
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
1425
- name: Install toolchain
1526
uses: dtolnay/rust-toolchain@nightly
16-
- name: doc (rand)
27+
28+
- name: Build docs
1729
env:
1830
RUSTDOCFLAGS: --cfg doc_cfg
1931
# --all builds all crates, but with default features for other crates (okay in this case)
2032
run: |
2133
cargo doc --all --features nightly,serde1,getrandom,small_rng
2234
cp utils/redirect.html target/doc/index.html
35+
2336
- name: Setup Pages
2437
uses: actions/configure-pages@v2
38+
2539
- name: Upload artifact
2640
uses: actions/upload-pages-artifact@v1
2741
with:
2842
path: './target/doc'
43+
2944
- name: Deploy to GitHub Pages
3045
id: deployment
3146
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)