Skip to content

Deploy website

Deploy website #3

name: Deploy the scratchattach website
on:
push:
branches:
- main
paths:
- 'website/**'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Deploy website directory to website branch
run: |
git worktree add /tmp/website --orphan website
cd /tmp/website
rm -rf *
cp -r ${{ github.workspace }}/website/* .
git add .
git commit -m "Deploy website directory to website branch"
git push -u origin website --force