diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 62ba382..5d448f1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ on: permissions: - contents: read # This is required for actions/checkout + contents: write # This is required for actions/checkout pull-requests: write id-token: write # This is required requesting the JWT @@ -109,6 +109,39 @@ jobs: -d "{\"team_reviewers\":[\"ai4sdlc-approval\"]}" \ https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/requested_reviewers -v + +### + # Build stage - converting md file to html using MkDocs + convert_md_to_html_gh : + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/main' # Run for non-main branches + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + + - name: Install MkDocs and dependencies + run: | + pip install mkdocs mkdocs-material + + - name: Build project with MkDocs + run: | + echo "Building your project..." + mkdocs build + echo "pwd in build project with MKDocs" + - name: Add .nojekyll + run: touch site/.nojekyll + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site +### # Build stage - converting md file to html using MkDocs convert_md_to_html: