Adding comments to github workflow #11
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
on: | |
push: | |
branches: # triggers the workflow on push events to the main branch | |
- main | |
workflow_dispatch: # allows you to run the workflow manually | |
jobs: | |
my_job: | |
name: deploy to staging | |
runs-on: ubuntu-latest # create a VM to run the workflow | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 # syncs your repository with the workflow's filesystem | |
- name: Set up Python | |
uses: actions/setup-python@v2 # sets up a Python environment | |
with: | |
python-version: '3.x' | |
- name: Install MkDocs # installs MkDocs | |
run: pip install mkdocs | |
- name: Deploy with MkDocs # deploys the site using MkDocs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # allows the workflow to access the repository otherwise it will fail due to laking write permissions | |
run: mkdocs gh-deploy --force |