Remove 2simple lock #152
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
| # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
| name: Deploy | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| updateLayouts: | |
| runs-on: ubuntu-latest | |
| if: github.repository_owner == 'ThemezerNX' | |
| steps: | |
| - name: Checkout Project | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v3 | |
| - name: Use Node.js 20 | |
| uses: actions/setup-node@v3 | |
| with: | |
| cache: 'pnpm' | |
| node-version: 20 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Verify all layouts | |
| run: pnpm run test | |
| - name: Prettify | |
| run: pnpm run prettify | |
| - name: Push changes | |
| run: | | |
| git config user.name github-actions | |
| git config user.email github-actions@github.com | |
| if [[ `git status --porcelain --untracked-files=no` ]]; then | |
| git commit -am "Prettify & Automated UUID generation" | |
| git push | |
| fi | |
| - name: Deploy | |
| uses: fjogeleit/http-request-action@v1 | |
| with: | |
| url: 'https://api.themezer.net/switch/layouts/run-update' | |
| method: 'POST' | |
| bearerToken: ${{ secrets.THEMEZER_BEARER_TOKEN }} | |
| timeout: 30000 | |
| customHeaders: '{"Content-Type": "application/json"}' | |
| data: '{"sha": "${{ github.sha }}", "branch": "${{ github.ref }}" }' |