File tree Expand file tree Collapse file tree 1 file changed +24
-14
lines changed Expand file tree Collapse file tree 1 file changed +24
-14
lines changed Original file line number Diff line number Diff line change 8
8
- master
9
9
10
10
jobs :
11
- ci :
12
- name : CI
13
- runs-on : ubuntu-latest
11
+ build :
14
12
env :
15
13
MDBOOK_VERSION : 0.4.51
16
- permissions :
17
- id-token : write
18
- contents : write
14
+ runs-on : ubuntu-latest
19
15
steps :
20
- - uses : actions/checkout@v3
16
+ - uses : actions/checkout@v4
21
17
- name : Install mdbook
22
18
run : curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz
23
19
- name : Check blacksmith format
24
20
run : cargo fmt --check --manifest-path=blacksmith/Cargo.toml
25
21
- name : Build book
26
22
run : ./mdbook build
27
- - name : Deploy book
28
- uses : rust-lang/simpleinfra/github-actions/static-websites@master
29
- with :
30
- deploy_dir : book
31
- github_token : " ${{ secrets.GITHUB_TOKEN }}"
23
+ - name : Upload artifact
32
24
if : github.ref == 'refs/heads/master'
25
+ uses : actions/upload-pages-artifact@v3
26
+ with :
27
+ path : ./book
28
+
29
+ deploy :
30
+ if : github.ref == 'refs/heads/master' && github.repository_owner == 'rust-lang'
31
+ needs : build
32
+
33
+ permissions :
34
+ pages : write
35
+ id-token : write
36
+
37
+ environment :
38
+ name : github-pages
39
+ url : ${{ steps.deployment.outputs.page_url }}
40
+
41
+ runs-on : ubuntu-latest
42
+ steps :
43
+ - id : deployment
44
+ uses : actions/deploy-pages@4
33
45
- name : Configure AWS credentials
34
- if : github.ref == 'refs/heads/master'
35
46
uses : aws-actions/configure-aws-credentials@v1
36
47
with :
37
48
role-to-assume : arn:aws:iam::890664054962:role/forge-rust-lang-org-ci
38
49
aws-region : us-east-1
39
50
- name : Invalidate CloudFront cache
40
51
run : aws cloudfront create-invalidation --distribution-id E12A3GKHZSREHP --paths "/*"
41
- if : github.ref == 'refs/heads/master'
You can’t perform that action at this time.
0 commit comments