File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,18 +11,38 @@ jobs:
1111 env :
1212 GITHUB_TOKEN : ${{ github.token }}
1313 permissions :
14- contents : read
14+ contents : write
1515 pull-requests : write
1616 steps :
1717 - uses : actions/checkout@v6
1818 - name : Get current date
1919 id : date
2020 run : echo "::set-output name=date::$(date +'%Y-%m-%d')"
2121
22+ - name : Remove existing staging branch if it exists
23+ run : |
24+ # Check if local staging branch exists and delete it
25+ if git show-ref --verify --quiet refs/heads/staging; then
26+ git branch -D staging
27+ fi
28+
29+ # Check if remote staging branch exists and delete it
30+ if git ls-remote --exit-code --heads origin staging; then
31+ git push origin --delete staging
32+ fi
33+
34+ - name : Checkout staging branch
35+ run : |
36+ git checkout -b staging
37+
38+ - name : Push staging branch
39+ run : |
40+ git push origin staging
41+
2242 - name : Create pull request
2343 run : |
24- gh pr create --base publication --head main \
44+ gh pr create --base publication --head staging \
2545 --reviewer remibetin \
2646 --reviewer daniel-montalvo \
2747 --title "WAI website update ${{ steps.date.outputs.date }}" \
28- --body "This is an automated pull request to publish ACT content to the WAI website."
48+ --body "This is a release candidate batch to be published to the WAI website after review and approval by WAI Staff ."
You can’t perform that action at this time.
0 commit comments