Skip to content

Commit

Permalink
version control pages - deployed from page build
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeoson committed Sep 22, 2024
1 parent 3fe4e85 commit 3d6f92a
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions docs/Net-Auto/intro-to-version-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ This page is under construction. Please check back later for updates.

A workflow that uses feature branches and pull requests (PRs) is a sane way to manage a codebase, collaborate with others, and maintain a clean main branch.

1. Understanding the Workflow
### Understanding the Workflow

In this workflow:

• Development happens in feature branches created from main.
• Pull requests are opened to merge changes from branches into main.
• Development happens in feature branches created from main.

• Pull requests are opened to merge changes from branches into main.

• Code review and testing occur before merging PRs.

• GitHub Actions can be configured to run on PRs for continuous integration (CI).

• Deployments happen when changes are merged into main.

2. Setting Up Feature Branches
Expand Down Expand Up @@ -113,18 +117,20 @@ You don’t want to deploy the site when the PR is created or updated, only afte
Modify the Deployment Step:
```yaml
- name: Build and Deploy MkDocs Site
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
mkdocs gh-deploy --force --clean
```
• if: github.event_name == 'push' && github.ref == 'refs/heads/main' ensures that the deployment step only runs when there’s a push to the main branch.
• This prevents deployments from occurring during PRs.
```yaml
- name: Build and Deploy MkDocs Site
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
mkdocs gh-deploy --force --clean
```
• if: github.event_name == 'push' && github.ref == 'refs/heads/main' ensures that the deployment step only runs when there’s a push to the main branch.
• This prevents deployments from occurring during PRs.
6. Reviewing and Merging Pull Requests
### Reviewing and Merging Pull Requests
Review the PR
Expand Down

0 comments on commit 3d6f92a

Please sign in to comment.