Skip to content

Merge pull request #230 from stefanvermaas/dependabot/npm_and_yarn/po… #58

Merge pull request #230 from stefanvermaas/dependabot/npm_and_yarn/po…

Merge pull request #230 from stefanvermaas/dependabot/npm_and_yarn/po… #58

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy to Production
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Node
uses: actions/setup-node@v4
- name: Find yarn cache location
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: JS package cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: |
yarn install --pure-lockfile
sudo apt-get -yqq install libpq-dev
- name: Build
env:
BRIDGETOWN_ENV: production
run: |
bin/bridgetown deploy
- name: Deploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
source: "output/*"
target: /var/www/stefanvermaas.com/html/
strip_components: 1