Skip to content

Deploy To GitHub Pages #2694

Deploy To GitHub Pages

Deploy To GitHub Pages #2694

Workflow file for this run

name: Deploy To GitHub Pages
on:
schedule:
- cron: '0 22 * * *'
pull_request:
push:
branches:
- master
jobs:
ci:
name: CI
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v3
- name: Install mdbook
run: curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.35/mdbook-v0.4.35-x86_64-unknown-linux-gnu.tar.gz | tar -xz
- name: Check blacksmith format
run: cargo fmt --check --manifest-path=blacksmith/Cargo.toml
- name: Build book
run: ./mdbook build
- name: Deploy book
uses: rust-lang/simpleinfra/github-actions/static-websites@master
with:
deploy_dir: book
github_token: "${{ secrets.GITHUB_TOKEN }}"
if: github.ref == 'refs/heads/master'
- name: Configure AWS credentials
if: github.ref == 'refs/heads/master'
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::890664054962:role/forge-rust-lang-org-ci
aws-region: us-east-1
- name: Invalidate CloudFront cache
run: aws cloudfront create-invalidation --distribution-id E12A3GKHZSREHP --paths "/*"
if: github.ref == 'refs/heads/master'