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>
28 lines
816 B
YAML
28 lines
816 B
YAML
name: Promote → GitHub
|
|
|
|
# Runs on GITEA ONLY. Mirrors only main + version tags to the public GitHub repo.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ['v*']
|
|
|
|
jobs:
|
|
push-github:
|
|
if: ${{ github.server_url != 'https://github.com' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Push main + tags to GitHub
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GH_PROMOTE_TOKEN }}
|
|
run: |
|
|
git remote add github "https://x-access-token:${GH_TOKEN}@github.com/Expressive-Tea/green-tea-site.git"
|
|
if [ "${{ github.ref_type }}" = "tag" ]; then
|
|
git push github "refs/tags/${{ github.ref_name }}"
|
|
else
|
|
git push github "HEAD:refs/heads/main"
|
|
git push github --tags
|
|
fi
|