Merge pull request #1054 from camunda/dependabot/github_actions/actio… #478
This file contains hidden or 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: publish-docs | |
| on: | |
| push: | |
| branches: [main] | |
| env: | |
| # Used by docusaurus publish-site command | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| GIT_USERNAME: camunda-bot | |
| REPO: ${{ github.repository }} | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 18 | |
| - name: Install Dependencies | |
| run: | | |
| cd docs | |
| npm ci | |
| - name: Build | |
| run: | | |
| cd docs | |
| npm run build | |
| - name: Publish | |
| run: | | |
| cd docs | |
| # Configure git client | |
| echo "Git repo - $REPO" | |
| echo "Git user - $GIT_USERNAME" | |
| echo "Event name - ${{github.event_name }}" | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "$GIT_USERNAME" | |
| echo "machine github.com login $GIT_USERNAME password $GITHUB_TOKEN" > ~/.netrc | |
| # Run docusaurus-publish | |
| GIT_USER=$GIT_USERNAME npm run deploy |