mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

maximthomas
25.02.2024 0531b8d47a4312c83a3c44080a09793fa820bb4e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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}