Create the rustdoc-contributors team #2273
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request] | |
jobs: | |
ci: | |
name: CI | |
runs-on: ubuntu-latest | |
if: github.repository == 'rust-lang/team' | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 50 | |
- name: Install Rust Stable | |
run: | | |
rustc -vV | |
rustup update stable | |
rustup default stable | |
rustc -vV | |
- name: Build the validation tool | |
run: cargo build | |
- name: Validate the repository contents | |
run: cargo run -- check --strict | |
env: | |
GITHUB_TOKEN: ${{ secrets.github_token }} | |
- name: Run rustfmt | |
run: cargo fmt -- --check | |
- name: Run tests | |
run: cargo test --workspace --all-features | |
- name: Build the contents of the static API | |
run: | | |
cargo run -- static-api build | |
echo "team-api.infra.rust-lang.org" > build/CNAME | |
- name: Deploy to GitHub Pages | |
run: | | |
touch build/.nojekyll | |
curl -LsSf https://raw.githubusercontent.com/rust-lang/simpleinfra/master/setup-deploy-keys/src/deploy.rs | rustc - -o /tmp/deploy | |
(cd build && /tmp/deploy) | |
env: | |
GITHUB_DEPLOY_KEY: ${{ secrets.GITHUB_DEPLOY_KEY }} | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
- name: Configure AWS credentials | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: arn:aws:iam::890664054962:role/ci--rust-lang--team | |
aws-region: us-west-1 | |
- name: Start the synchronization tool | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
run: | | |
# Introduce some artifical delay to help github pages propagate. | |
sleep 60 | |
aws --region us-west-1 lambda invoke --function-name start-sync-team output.json | |
cat output.json | python3 -m json.tool |