Skip to content

Deploy website

Deploy website #5

name: Deploy website
on:
push:
branches:
- main
paths:
- 'website/**'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- 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 switch --orphan website-tmp
git rm -rf . || true
cp -r website/* .
git add .
git commit -m "Deploy website directory"
git push origin website --force