name: Package/Deploy
|
|
on:
|
push:
|
jobs:
|
package-deploy-docs-test:
|
runs-on: 'ubuntu-latest'
|
steps:
|
- name: Print github context
|
env:
|
GITHUB_CONTEXT: ${{ toJSON(github) }}
|
run: echo "$GITHUB_CONTEXT"
|
- uses: actions/checkout@v4
|
with:
|
fetch-depth: 0
|
submodules: recursive
|
|
- name: Configure Git User
|
run: |
|
git config --global user.name "Open Identity Platform Community"
|
git config --global user.email "open-identity-platform-opendj@googlegroups.com"
|
cd ..
|
|
- uses: actions/checkout@v4
|
continue-on-error: true
|
with:
|
repository: OpenIdentityPlatform/doc.openidentityplatform.org
|
path: doc.openidentityplatform.org
|
token: ${{ secrets.OIP_PUSH_TOKEN }}
|
|
- name: Publish docs to site
|
continue-on-error: true
|
shell: bash
|
env:
|
#OIP_PUSH_TOKEN: ${{ secrets.OIP_PUSH_TOKEN }}
|
#USERNAME: github-actions[bot]
|
DOCS_TEST_BRANCH: test-deploy
|
#git config --unset-all http.https://github.com/.extraheader
|
run: |
|
export REPO_NAME_LC=$(echo '${{github.event.repository.name}}' | tr '[:upper:]' '[:lower:]')
|
export SITE_DOC_FOLDER=${REPO_NAME_LC}-doc-generated-ref
|
cd doc.openidentityplatform.org
|
git checkout -b ${DOCS_TEST_BRANCH}
|
cp -R ../${SITE_DOC_FOLDER}/test-doc-file ../doc.openidentityplatform.org/test-doc-file
|
git add -A
|
git commit -a -m "upload docs after deploy ${{ github.sha }}"
|
git push --force https://github.com/OpenIdentityPlatform/doc.openidentityplatform.org.git ${DOCS_TEST_BRANCH}
|