Skip to content

Commit

Permalink
Set up auto deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinfreund committed Nov 16, 2024
1 parent 735b29e commit bfca19a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy

on:
push:
branches: [main]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: actions/cache@v4
id: node-modules-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
- if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm clean-install
- run: npm run build
- uses: burnett01/rsync-deployments@796cf0d5e4b535745ce49d7429f77cf39e25ef39 # v7.0.1
with:
switches: --archive --delete --human-readable --recursive --verbose
path: _site/
remote_path: /var/www/virtual/${{ secrets.SSH_USERNAME }}/${{ vars.SITE_DIRECTORY }}
remote_host: ${{ secrets.SSH_HOST }}
remote_user: ${{ secrets.SSH_USERNAME }}
remote_key: ${{ secrets.SSH_PRIVATE_KEY }}
remote_key_pass: ${{ secrets.SSH_PRIVATE_KEY_PASS }}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.11.0

0 comments on commit bfca19a

Please sign in to comment.