forked from rust-lang/team
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.69 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
on: [push, pull_request]
jobs:
ci:
name: CI
runs-on: ubuntu-latest
if: github.repository == 'rust-lang/team'
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: Start the synchronization tool
run: |
aws --region us-west-1 lambda invoke --function-name start-sync-team output.json
cat output.json | python3 -m json.tool
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push' && github.ref == 'refs/heads/master'