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.
68 lines
1.9 KiB
68 lines
1.9 KiB
name: Release Docs |
|
|
|
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-docs: |
|
# runs-on: ubuntu-latest |
|
runs-on: self-hosted |
|
|
|
steps: |
|
- uses: actions/checkout@v4 |
|
with: |
|
ref: ${{ github.sha }} |
|
- name: Gen Docs |
|
run: | |
|
echo "Generating Docs" |
|
make doc |
|
- name: Deploy Docs |
|
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 docs |
|
cp -a \ |
|
../docs/source/_build/html/* \ |
|
../docs/source/_build/html/.buildinfo \ |
|
../docs/source/_build/html/.nojekyll \ |
|
. |
|
git add --all |
|
if [ -z "$(git status --porcelain)" ]; then |
|
echo "No changes to commit." |
|
exit 0 |
|
fi |
|
git commit -m "chore: ($(date)) - updated docs" |
|
git push --force origin docs |
|
|
|
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
|
|
|