Skip to content

Commit 950e712

Browse files
authored
Create autopublish.yaml
1 parent 8b2ef82 commit 950e712

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

autopublish.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
schedules:
2+
- cron: "0 17 * * 1-5"
3+
displayName: "Scheduled run at 10 AM PT on weekdays"
4+
branches:
5+
include:
6+
- main
7+
always: false # This ensures the pipeline only runs if there have been changes since the last successful run.
8+
9+
- cron: "0 22 * * 1-5"
10+
displayName: "Afternoon run at 3:00 PM PT M-F"
11+
branches:
12+
include:
13+
- main
14+
always: false
15+
16+
trigger:
17+
- main
18+
19+
jobs:
20+
- job: MergeMainToLive
21+
pool:
22+
vmImage: 'ubuntu-latest'
23+
steps:
24+
- checkout: self
25+
persistCredentials: true
26+
- script: |
27+
git config --global user.name "Ted Hudek"
28+
git config --global user.email "[email protected]"
29+
git checkout main
30+
git checkout live
31+
git merge main --no-ff --no-commit
32+
if [ $? -eq 0 ]; then
33+
git commit -m "Merged main into live"
34+
git push origin live
35+
else
36+
echo "Error merging main to live"
37+
exit 1
38+
fi
39+
displayName: 'Merge main to live if main has changed'

0 commit comments

Comments
 (0)