Update Structure-‐-Language.md #39
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: Documentation Sync | |
on: | |
push: | |
env: | |
GIT_AUTHOR_NAME: Actionbot | |
GIT_AUTHOR_EMAIL: actions@github.com | |
permissions: | |
actions: write | |
checks: write | |
contents: write | |
deployments: write | |
id-token: write | |
issues: write | |
discussions: write | |
packages: write | |
pages: write | |
pull-requests: write | |
repository-projects: write | |
security-events: write | |
statuses: write | |
jobs: | |
job-create-docs-directory: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if Docs Directory Exists | |
run: | | |
if [ ! -d "docs" ]; then | |
echo "Creating docs directory..." | |
mkdir docs | |
else | |
echo "Docs directory already exists." | |
fi | |
job-sync-docs-to-wiki: | |
runs-on: ubuntu-latest | |
needs: job-create-docs-directory | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Sync docs to wiki | |
uses: newrelic/wiki-sync-action@main | |
with: | |
source: docs | |
destination: wiki | |
token: ${{ secrets.GITHUB_TOKEN }} | |
gitAuthorName: ${{ env.GIT_AUTHOR_NAME }} | |
gitAuthorEmail: ${{ env.GIT_AUTHOR_EMAIL }} | |
job-sync-wiki-to-docs: | |
runs-on: ubuntu-latest | |
needs: job-create-docs-directory | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Sync Wiki to Docs | |
uses: newrelic/wiki-sync-action@main | |
with: | |
source: wiki | |
destination: docs | |
token: ${{ secrets.GITHUB_TOKEN }} | |
gitAuthorName: ${{ env.GIT_AUTHOR_NAME }} | |
gitAuthorEmail: ${{ env.GIT_AUTHOR_EMAIL }} | |
branch: main |