Skip to content

added contents write permissions to GIT_TOKEN #4

added contents write permissions to GIT_TOKEN

added contents write permissions to GIT_TOKEN #4

Workflow file for this run

name: Deploy MkDocs to GitHub Pages
on:
push:
branches:
- master # Trigger workflow only on pushes to the main branch
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checkout the repository code
- name: Checkout code
uses: actions/checkout@v3
# Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
# Install dependencies (MkDocs and Material theme)
- name: Install dependencies
run: |
pip install mkdocs-material
# Build and deploy the site to GitHub Pages
- name: Deploy to GitHub Pages
run: |
# sed -i -E "s/your-username/${{github.repository_owner}}/g" ./README.md
# sed -i -E "s/my-mkdocs-project/${{github.repository}}/g" ./README.md
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/ADORSYS-GIS/mk-docs.git
mkdocs gh-deploy --force