-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db16517
commit 54ab921
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Publish Site | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
message: | ||
type: string | ||
required: true | ||
secrets: | ||
netlify_token: | ||
required: true | ||
netlify_site_id: | ||
required: true | ||
|
||
jobs: | ||
publish: | ||
name: Puslish Site | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
cache: pip | ||
|
||
- name: Install Dependencies | ||
run: pip install -r requirements.txt | ||
|
||
- name: Build Site | ||
run: mkdocs build --clean | ||
|
||
- name: Deploy to Netlify | ||
uses: jsmrcaga/action-netlify-deploy@v2.3.0 | ||
with: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.netlify_token }} | ||
NETLIFY_SITE_ID: ${{ secrets.netlify_site_id }} | ||
NETLIFY_DEPLOY_TO_PROD: true | ||
NETLIFY_DEPLOY_MESSAGE: ${{ inputs.message }} | ||
build_directory: site | ||
install_command: 'echo Dependencies already installed.' | ||
build_command: 'echo Project already built.' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: On Push (Main) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish: | ||
name: Publish Site | ||
uses: ./.github/workflows/callable-publish.yml | ||
with: | ||
message: ${{ github.event.head_commit.message }} | ||
secrets: | ||
netlify_token: ${{ secrets.NETLIFY_TOKEN }} | ||
netlify_site_id: ${{ secrets.NETLIFY_SITE_ID }} |