Feat 389/accordion component #80
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Branches | |
on: | |
pull_request: | |
types: [opened, reopened, closed] | |
branches: ["main", "develop"] | |
jobs: | |
update-branches-on-gh-pages: | |
if: "!contains(github.head_ref, 'dependabot/')" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
- run: mkdir -p deploy-pr/pr | |
- run: | | |
if [ ${{github.event.pull_request.state}} = 'open' ]; then | |
echo "Adding ${{github.head_ref}} to active branches" | |
jq '.branches += ["${{github.head_ref}}"]' pr/active-branches.json > temp.json | |
fi | |
if [ ${{github.event.pull_request.state}} = 'closed' ]; then | |
echo "Removing ${{github.head_ref}} to active branches" | |
jq '.branches -= ["${{github.head_ref}}"]' pr/active-branches.json > temp.json | |
fi | |
mv temp.json pr/active-branches.json | |
- name: Commit & Push changes | |
uses: actions-js/push@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
author_name: "Github action" | |
message: "Update active branches" | |
branch: "gh-pages" |