chore(deps): bump micromatch and gulp #45
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: 'Build and deploy' | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
- name: 'Cache Node dependencies' | |
uses: actions/cache@v3 | |
with: | |
path: '~/.npm' | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install npm dependencies | |
run: npm ci | |
- name: Run build task | |
run: npm run build --if-present | |
- name: Deploy to Server | |
uses: easingthemes/ssh-deploy@v2.2.11 | |
if: | | |
github.ref == 'refs/heads/main' && github.event.repository.fork == false && env.DEPLOY_SSH != '' | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }} | |
ARGS: "-rltgoDzvO --delete" | |
SOURCE: "build/" | |
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} | |
TARGET: ${{ secrets.REMOTE_TARGET }} | |
env: | |
DEPLOY_SSH: ${{ secrets.REMOTE_TARGET }} |