Skip to content

Fix script editor

Fix script editor #4

Workflow file for this run

on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 📂 setup
uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Build
run: npm run build
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: site
path: .
deploy:
runs-on: ubuntu-latest
needs: [ build ]
if: github.ref == 'refs/heads/master'
steps:
- name: Download build result
uses: actions/download-artifact@v4
with:
name: site
- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
ssh-keyscan ssh.nickwalker.us >> ~/.ssh/known_hosts
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
- name: 🚀 deploy
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: "rsync -havz * [email protected]:/var/www/marblizer.nickwalker.us/"
- name: Purge Cloudflare cache
uses: jakejarvis/[email protected]
env:
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}