Merge pull request #141 from KingCosmic/dev #53
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
| name: Generate a build, publish and push to another branch. | |
| on: | |
| push: | |
| branches: | |
| - main # The branch name to build deployments from. | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| name: Build and Push | |
| steps: | |
| - name: 🚚 Get Latest Code | |
| uses: actions/checkout@v4 | |
| - name: 📦 Install Packages | |
| run: npm install | |
| - name: 🔨 Build | |
| run: npm run build | |
| - name: 📂 Push Files | |
| uses: s0/git-publish-subdir-action@develop | |
| env: | |
| REPO: self | |
| BRANCH: build # The branch where we want our build pushed. | |
| FOLDER: dist # the directory where our build is placed. | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to bother getting a token | |
| MESSAGE: "Build: ({sha}) {msg}" # The commit message |