Using github actions might actually push a change (#1603)

* Using github actions might actually push a change

* skip if not actually going to deploy

* Don't setup Pages if we aren't deploying

* skip deploy when not deploying
This commit is contained in:
James Hodgkinson 2023-05-07 12:44:30 +10:00 committed by GitHub
parent e6d23f1f4c
commit 5d54069e7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,6 +51,11 @@ jobs:
parent_id: ${{ github.ref }}
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'kanidm/kanidm' }}
needs:
- fanout
- docs_master
@ -61,7 +66,8 @@ jobs:
uses: actions/download-artifact@v3
with:
name: docs
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Extract the files
run: |
find . -name '*.tar.gz' -exec tar zxf "{}" \;
@ -71,9 +77,11 @@ jobs:
cd ..
ls -la docs/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
# Upload entire repository
path: 'docs/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2