Skip to content

Commit

Permalink
Add back pushing / publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Dec 21, 2023
1 parent 29f0127 commit 6ec7d12
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- uses: actions/download-artifact@v4
with:
name: github-pages
Expand All @@ -72,14 +69,22 @@ jobs:
- name: Update documentation
run: |
tar -xvf doc_artifact/artifact.tar --directory .
ls -l
rm -r doc_artifact
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git init
git config --global user.email ${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com
git config --global user.name ${GITHUB_ACTOR}
git remote add upstream https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git checkout -b gh-pages
touch .nojekyll
git add .nojekyll
git commit -m "Add .nojekyll for ${GITHUB_SHA}"
# - name: Commit and push changes
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# git config --global user.email ${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com
# git config --global user.name ${GITHUB_ACTOR}
# git add .
# git diff-index --quiet HEAD 2>&1 > /dev/null || git commit -m "Update documentation for ${TARGET_DIR}" && git push
git add -A .
git commit -m "Rebuild page at ${GITHUB_SHA}"
git push -f upstream gh-pages:gh-pages
2 changes: 1 addition & 1 deletion doc/aux/main_index_redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<title>Redirecting to master branch</title>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./master/index.html">
<link rel="canonical" href="https://tmadlener.github.io/podio/master/index.html">
<link rel="canonical" href="https://tmadlener.github.io/podio/docs-on-gh-pages/index.html">
</head>
</html>

0 comments on commit 6ec7d12

Please sign in to comment.