Skip to content

Commit d38b475

Browse files
ehussMark-Simulacrum
authored andcommitted
Fix mdbook deployment
1 parent 72f9311 commit d38b475

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,23 @@ jobs:
1515
id-token: write
1616
contents: write
1717
steps:
18-
- uses: actions/checkout@v2
19-
- uses: XAMPPRocky/[email protected]
18+
- uses: actions/checkout@v3
19+
- name: Install mdbook
20+
run: curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.22/mdbook-v0.4.22-x86_64-unknown-linux-gnu.tar.gz | tar -xz
21+
- name: Build book
22+
run: ./mdbook build
23+
- name: Deploy book
24+
uses: rust-lang/simpleinfra/github-actions/static-websites@master
2025
with:
21-
token: ${{ secrets.GITHUB_TOKEN }}
22-
build_only: ${{ github.ref != 'refs/heads/master' }}
26+
deploy_dir: book
27+
github_token: "${{ secrets.GITHUB_TOKEN }}"
28+
if: github.ref == 'refs/heads/master'
2329
- name: Configure AWS credentials
2430
if: github.ref == 'refs/heads/master'
2531
uses: aws-actions/configure-aws-credentials@v1
2632
with:
2733
role-to-assume: arn:aws:iam::890664054962:role/forge-rust-lang-org-ci
2834
aws-region: us-east-1
29-
- run: aws cloudfront create-invalidation --distribution-id E12A3GKHZSREHP --paths "/*"
35+
- name: Invalidate CloudFront cache
36+
run: aws cloudfront create-invalidation --distribution-id E12A3GKHZSREHP --paths "/*"
3037
if: github.ref == 'refs/heads/master'

0 commit comments

Comments
 (0)