-
Notifications
You must be signed in to change notification settings - Fork 444
36 lines (30 loc) · 1.06 KB
/
publish-web.yml
File metadata and controls
36 lines (30 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Publish Web
on:
push:
branches: main
permissions: {}
jobs:
publish-web:
runs-on: ubuntu-latest
permissions:
contents: write # needed for pushing back to the repo
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: gh-pages
persist-credentials: true # persists the token for git push below
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
id: admin-cache
with:
path: ~/.cargo/bin
key: rustsec-admin-fd0658040d06dff9569dd7b2df60439db93403ec
- name: Install rustsec-admin
if: steps.admin-cache.outputs.cache-hit != 'true'
run: cargo install --git https://github.com/rustsec/rustsec rustsec-admin --rev fd0658040d06dff9569dd7b2df60439db93403ec
- run: |
rustsec-admin web .
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Update gh-pages" || true
git push || true