Update Element to v1.12.5 #90
This file contains hidden or 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
| # Deploys apps to the public branch, which is the branch from which the Pages website is served. | |
| name: Deploy apps | |
| on: | |
| # Allow manual trigger from the Actions tab: | |
| # https://github.com/Automattic/matrix.wordpress.net/actions/workflows/deploy.yml | |
| workflow_dispatch: | |
| # Trigger when apps change | |
| push: | |
| branches: | |
| - 'master' | |
| paths: | |
| - 'apps/**' | |
| - 'overrides/**' | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| # The ACCESS_TOKEN secret is defined at | |
| # https://github.com/Automattic/matrix.wordpress.net/settings/secrets/actions | |
| token: ${{ secrets.ACCESS_TOKEN }} | |
| ref: public | |
| path: public | |
| - uses: actions/checkout@v2 | |
| with: | |
| ref: master | |
| path: master | |
| - name: Clear public directory, but leave .git directories in place | |
| run: | | |
| mv public/.git public-git | |
| rm -rf public/* | |
| mv public-git public/.git | |
| - name: Deploy element | |
| run: cp -R master/apps/element/* public/ | |
| - name: Apply element overrides | |
| run: | | |
| cp -Rf master/overrides/element/* public/ | |
| rm -rf master/overrides/element | |
| - name: Deploy matrix.to | |
| run: cp -R master/apps/matrix.to public/permalink | |
| - name: Apply remaining overrides | |
| run: cp -Rf master/overrides/* public/ | |
| - name: Check for modified files | |
| id: git-check | |
| run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") | |
| working-directory: ./public | |
| - name: Commit release | |
| if: steps.git-check.outputs.modified == 'true' | |
| working-directory: ./public | |
| run: | | |
| git config --global user.name 'Team Orbit' | |
| git config --global user.email '[email protected]' | |
| git pull | |
| git add . | |
| git commit -m "New release" | |
| git push |