Sync 3.x Tables #1
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: Sync 3.x Tables | |
on: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
environment: 3.x | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Branch Name | |
uses: nelonoel/[email protected] | |
- run: echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV | |
- name: Build & Deploy GPM Package | |
uses: appleboy/[email protected] | |
env: | |
BRANCH: ${{ env.BRANCH_NAME }} | |
with: | |
command_timeout: 20m | |
host: ${{ secrets.DEPLOY_HOST }} | |
key: ${{ secrets.DEPLOY_KEY }} | |
username: ${{ secrets.DEPLOY_USER }} | |
envs: BRANCH | |
script_stop: true | |
script: | | |
cd /www/pkgs/fred/ | |
git add . | |
git stash | |
git fetch origin | |
git checkout -f $BRANCH | |
git pull origin $BRANCH | |
cd /www/pkgs/fred/core/components/fred/ | |
/home/.bin/composer install --no-dev | |
cd /www/pkgs/fred/ | |
npm install | |
npm run build | |
/www/pkgs/gpm/bin/gpm fred:update --alterDB | |
git add . | |
git commit -m "Update fred 3.x tables" | |
git push origin $BRANCH |