Merge pull request #42 from bowphp/dependabot/npm_and_yarn/semver-5.7.2 #72
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: bowphp-docs | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
php-version: [8.2] | |
os: [ubuntu-latest] | |
name: build php-${{ matrix.php-version }} / node-${{ matrix.node-version }} on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysql, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | |
coverage: none | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build --if-present | |
- name: Copy folder content recursively to remote | |
uses: garygrossgarten/github-action-scp@release | |
with: | |
local: build | |
recursive: true | |
remote: bowphp-build | |
host: ${{ secrets.BOWPHP_WEBSITE_REMOTE_HOST }} | |
username: ${{ secrets.BOWPHP_WEBSITE_REMOTE_USER }} | |
password: ${{ secrets.BOWPHP_WEBSITE_REMOTE_PASSWORD }} | |
- name: Deploy to Server | |
uses: appleboy/[email protected] | |
if: ${{ github.event_name == 'pull_request' }} | |
with: | |
host: ${{ secrets.BOWPHP_WEBSITE_REMOTE_HOST }} | |
username: ${{ secrets.BOWPHP_WEBSITE_REMOTE_USER }} | |
password: ${{ secrets.BOWPHP_WEBSITE_REMOTE_PASSWORD }} | |
script_stop: true | |
script: | | |
rm -rf bowphp.com/.git | |
cp -rf bowphp-build/* bowphp.com | |
ls -al bowphp.com |