Merge pull request #5 from wednesday-solutions/alenbaby13-patch-1 #8
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: React Template CD | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: yarn | |
- name: Build storybooks and react | |
run: yarn predeploy | |
- name: Deploy gh-pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: build | |
- name: Set branch name | |
id: vars | |
run: echo ::set-output name=stage::${GITHUB_REF#refs/*/} | |
- name: Create badges | |
run: yarn run test:badges | |
- name: Commit badges | |
uses: EndBug/add-and-commit@v7 | |
with: | |
author_name: Gitflow | |
author_email: git@wednesday.is | |
message: 'Update badges' | |
add: 'badges/' | |
push: false | |
- name: Git pull origin | |
run: | | |
git pull origin ${{ github.ref }} | |
- name: Pushing to a protected branch | |
uses: CasperWA/push-protected@v2 | |
with: | |
token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }} | |
branch: ${{ steps.vars.outputs.stage }} | |
unprotect_reviews: true |