@@ -65,12 +65,27 @@ jobs:
65
65
pages : write
66
66
if : github.event_name == 'merge_group'
67
67
steps :
68
+ - uses : actions/checkout@v4
69
+ with :
70
+ persist-credentials : false
71
+
68
72
- name : Download built JSON API and sync-team
69
73
uses : actions/download-artifact@v4
70
74
with :
71
75
name : team-api-output
72
76
path : build
73
77
78
+ - name : Sync changes
79
+ env :
80
+ GITHUB_TOKEN : ${{ secrets.WRITE_GITHUB_TOKEN }}
81
+ MAILGUN_API_TOKEN : ${{ secrets.MAILGUN_API_TOKEN }}
82
+ EMAIL_ENCRYPTION_KEY : ${{ secrets.EMAIL_ENCRYPTION_KEY }}
83
+ ZULIP_API_TOKEN : ${{ secrets.ZULIP_API_TOKEN }}
84
+ ZULIP_USERNAME : ${{ secrets.ZULIP_USERNAME }}
85
+ run : |
86
+ cargo run --manifest-path sync-team/Cargo.toml \
87
+ apply --team-json build
88
+
74
89
- name : Disable Jekyll
75
90
run : touch build/.nojekyll
76
91
@@ -79,22 +94,11 @@ jobs:
79
94
with :
80
95
path : build
81
96
97
+ # Upload the pages only if the sync succeeded, to always keep the
98
+ # most up-to-date state in the web endpoint.
82
99
- name : Deploy to GitHub Pages
83
100
uses : actions/deploy-pages@v4
84
101
85
- - name : Configure AWS credentials
86
- uses : aws-actions/configure-aws-credentials@v1
87
- with :
88
- role-to-assume : arn:aws:iam::890664054962:role/ci--rust-lang--team
89
- aws-region : us-west-1
90
-
91
- - name : Start the synchronization tool
92
- run : |
93
- # Introduce some artificial delay to help github pages propagate.
94
- sleep 60
95
- aws --region us-west-1 lambda invoke --function-name start-sync-team output.json
96
- cat output.json | python3 -m json.tool
97
-
98
102
# Summary job for the merge queue.
99
103
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
100
104
CI :
0 commit comments