Main copy (#1212) #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push to External Docs Repo | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
push: | |
runs-on: ubuntu-latest | |
name: Push to AviatrixSystems Docs | |
environment: aviatrixsystems-docs | |
if: (${{github.repository}} == "AviatrixDev/Documentation") | |
steps: | |
- name: Get Token | |
id: get_workflow_token | |
uses: peter-murray/workflow-application-token-action@8e1ba3bf1619726336414f1014e37f17fbadf1db # v2.1.0 | |
with: | |
organization: AviatrixSystems | |
application_id: ${{ secrets.AVIATRIXSYSTEMS_DOCS_RELASE_TOKEN_APP_ID }} | |
application_private_key: ${{ secrets.AVIATRIXSYSTEMS_DOCS_RELASE_TOKEN_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Git remote add | |
run: git remote add prod-doc https://aviatrix:${{ steps.get_workflow_token.outputs.token }}@github.com/AviatrixSystems/Docs.git | |
- name: Git fetch | |
run: git fetch prod-doc | |
- name: Git push | |
run: git push --force prod-doc main:main-copy | |
env: | |
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }} |