on: [push, pull_request] jobs: ci: name: CI runs-on: ubuntu-latest steps: - uses: actions/checkout@master 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 clippy run: cargo clippy -- -Dwarnings - 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.ref == 'refs/heads/master'