Skip to content

Commit

Permalink
gh-pages action: add id-token write permission (#1265)
Browse files Browse the repository at this point in the history
* gh-pages action: add id-token write permission

* gh-pages action: add environment
  • Loading branch information
dhardy committed Nov 14, 2022
1 parent 0aca902 commit 7aa25d5
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: gh-pages

permissions:
contents: read
pages: write
id-token: write

on:
push:
branches:
Expand All @@ -9,23 +14,33 @@ jobs:
deploy:
name: GH-pages documentation
runs-on: ubuntu-latest
environment:
name: github-pages
url: https://rust-random.github.io/rand/

steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
- name: doc (rand)

- name: Build docs
env:
RUSTDOCFLAGS: --cfg doc_cfg
# --all builds all crates, but with default features for other crates (okay in this case)
run: |
cargo doc --all --features nightly,serde1,getrandom,small_rng
cp utils/redirect.html target/doc/index.html
- name: Setup Pages
uses: actions/configure-pages@v2

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './target/doc'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit 7aa25d5

Please sign in to comment.