Skip to content

Commit

Permalink
Merge pull request #136 from fumikito/bugfix/build-error
Browse files Browse the repository at this point in the history
#134 Fix build script and Add rsync to test server
  • Loading branch information
fumikito authored Aug 28, 2024
2 parents 52b52c1 + 115f642 commit 7f2082d
Show file tree
Hide file tree
Showing 4 changed files with 8,568 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/wordpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ jobs:
- name: Check JS & CSS syntax
run: npm run lint

- name: Ensure build works
run: npm run package

status-check:
name: Status Check
needs: [ test, assets, lint, analyze ]
Expand All @@ -121,6 +124,42 @@ jobs:
run: echo "All Green!"


deploy:
name: Deploy Gianism.info
needs: [ status-check ]
if: contains(github.ref, 'master') && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2
with:
php-version: 7.2
tools: composer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Node
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Build Plugin
run: bash bin/build.sh refs/tags/${{ github.sha }}

- name: Deploy with Rsync
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{secrets.GIANISM_XSERVER}}
with:
flags: '-rptv --checksum --delete'
options: '--exclude-from=.distignore'
ssh_options: '-p 10022'
src: "./"
dest: "[email protected]:/home/gianism002/gianism.info/public_html/wp-content/plugins/gianism/"

release:
name: Deploy WordPress.org
needs: [ status-check ]
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ assets/
doc/
readme.txt
language/wp-gianism.mo
package-lock.json
composer.lock
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ gulp.task('copylib', function () {
.pipe(gulp.dest('./assets/fonts/')),
// Copy JS Cookie
gulp.src([
'./node_modules/js-cookie/src/js.cookie.js'
'./node_modules/js-cookie/dist/js.cookie.min.js'
])
.pipe($.uglify())
.pipe(gulp.dest('./assets/js/'))
Expand Down
Loading

0 comments on commit 7f2082d

Please sign in to comment.