ci: add build gate + promote + release workflows (two-forge)
CI / build (pull_request) Failing after 24s
CI / build (pull_request) Failing after 24s
ci.yml: astro build on PR/push to main. promote.yml (Gitea-only): mirror main + tags to Expressive-Tea/green-tea-site. release.yml (GitHub-only): on a v* tag, build and attach dist as a .tar.gz to the GitHub release for the cPanel deploy. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
3 files changed
+72
No files matched your search
@@ -0,0 +1,26 @@
|
||||
name: Release → dist.tar.gz
|
||||
|
||||
# Production artifact. Runs on GITHUB ONLY, on a version tag. Builds the static site
|
||||
# and packages dist/ as a .tar.gz attached to the GitHub release — the cPanel deploy
|
||||
# pulls that artifact.
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
|
||||
jobs:
|
||||
package:
|
||||
if: ${{ github.server_url == 'https://github.com' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- name: Package dist/
|
||||
run: tar -czf "green-tea-site-${{ github.ref_name }}.tar.gz" -C dist .
|
||||
- name: Attach to GitHub release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: green-tea-site-${{ github.ref_name }}.tar.gz
|
||||
Reference in new issue
Block a user