Files
etydotonl/.gitea/workflows/site.yml
T
Glyphscribe Ety c8ae94df3d
site / build (push) Failing after 8s
site / deploy (push) Skipped
alter workflow to use v3
2026-11-10 23:21:04 -06:00

60 lines
1.2 KiB
YAML

name: site
on:
push:
branches: ["main"]
concurrency:
group: site-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: build
steps:
- uses: actions/checkout@v3
- name: Install
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Build
run: npm run build
- name: Validate
run: npm run check
- name: Upload
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: site
path: _site/
retention-days: 7
if-no-files-found: error
deploy:
needs: build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: deploy
defaults:
run:
shell: bash
steps:
- uses: actions/download-artifact@v3
with:
name: site
path: _site
- name: Publish
env:
LIVE: /deploy
run: |
set -euo pipefail
# dont sync empty builds
test -f _site/index.html
rsync -trl --delete --chmod=D755,F644 _site/ "$LIVE/"
echo "deployed site."