summaryrefslogblamecommitdiffstats
path: root/.github/workflows/ci-deploy.yml
blob: 6a160b47c1eef0647408de2d5f62ffd3f09e0099 (plain) (tree)
1
2
3
4
5
6




                               
                                         







                                                          
                                                      








                                                   
                                                 
                                                                                 
                                                       
                                                  

                                            

                                                                                    





                                                                            
name: CI - copy dist/ to master

on:
        push:
                branches:
                        - current-release

jobs:
        build:
                runs-on: ubuntu-latest
                steps:
                        - name: Checkout to release branch
                          uses: actions/checkout@v2
                          with:
                                  ref: current-release
                        - name: Copy dist/ folder
                          run: |
                                  cp -r dist /tmp/
                        - name: Checkout to master
                          uses: actions/checkout@v2
                          with:
                                  ref: master
                        - name: Replace files
                          run: |
                                  rm -r * || true
                                  find . ! -name '.git' -type d -exec rm -rf {} +
                                  mv /tmp/dist/.[!.]* .
                                  mv /tmp/dist/* .
                        - name: Commit files
                          run: |
                                  git config --global user.email "action@github.com"
                                  git config --global user.name "GitHub CI Action"
                                  git add -A
                                  git commit -m "Mirror change from release"
                        - name: Push changes
                          uses: ad-m/github-push-action@master
                          with:
                                  github_token: ${{ secrets.GITHUB_TOKEN }}