You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

66 lines
1.8 KiB

name: Release Sandbox
on:
workflow_dispatch:
workflow_call:
# push:
# branches:
# - main
# paths:
# - 'TermTk/**'
# - 'docs/**'
# - 'tests/**'
# - 'tutorial/**'
# release:
# types:
# - created # Trigger the workflow when a release is created
permissions:
contents: write
pull-requests: write
actions: read
pages: write
id-token: write
jobs:
gen-sandbox:
# runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Deploy Sandbox
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
run: |
git config --global user.name 'Eugenio Parodi - Action'
git config --global user.email 'ceccopierangioliegenio@googlemail.com'
git clone https://${GITHUB_TOKEN}@github.com/ceccopierangiolieugenio/pyTermTk-Docs.git
cd pyTermTk-Docs
git fetch --all
git checkout sandbox
rm -rf sandbox
mkdir -p sandbox
cp -a \
../tests/sandbox/*.html \
../tools/webExporter/js \
sandbox
git add --all
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit."
exit 0
fi
git commit -m "chore: ($(date)) - updated sandbox"
git push --force origin sandbox
git checkout gh-pages
git reset --hard initial-commit
git merge origin/docs -m "chore: ($(date)) - merged docs"
git merge origin/sandbox -m "chore: ($(date)) - merged sandbox"
git merge origin/sandbox-www -m "chore: ($(date)) - merged sandbox-www"
git merge origin/sandbox-bin -m "chore: ($(date)) - merged sandbox-bin"
git push --force origin gh-pages