forked from MicrosoftDocs/quantum-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
quantum-docs-pr-ci.yml
39 lines (36 loc) · 964 Bytes
/
quantum-docs-pr-ci.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
schedules:
- cron: "0 17 * * 1-5"
displayName: "Scheduled run at 10 AM PT on weekdays"
branches:
include:
- main
always: false # This ensures the pipeline only runs if there have been changes since the last successful run.
- cron: "0 22 * * 1-5"
displayName: "Afternoon run at 3:00 PM PT M-F"
branches:
include:
- main
always: false
trigger:
- main
jobs:
- job: MergeMainToLive
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
persistCredentials: true
- script: |
git config --global user.name "Ted Hudek"
git config --global user.email "[email protected]"
git checkout main
git checkout live
git merge main --no-ff --no-commit
if [ $? -eq 0 ]; then
git commit -m "Merged main into live"
git push origin live
else
echo "Error merging main to live"
exit 1
fi
displayName: 'Merge main to live if main has changed'