25 lines
660 B
YAML
25 lines
660 B
YAML
name: Deploy
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: node:20-bookworm
|
|
volumes:
|
|
- /mnt/deploy:/mnt/deploy
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Publish to docroot
|
|
run: |
|
|
find /mnt/deploy -mindepth 1 -delete
|
|
cp -R . /mnt/deploy/
|
|
rm -rf /mnt/deploy/.git /mnt/deploy/.gitea
|
|
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
|
|
echo "${{ github.run_number }} ($SHORT_SHA)" > /mnt/deploy/build.txt
|
|
find /mnt/deploy -type d -exec chmod 755 {} +
|
|
find /mnt/deploy -type f -exec chmod 644 {} +
|