-
Notifications
You must be signed in to change notification settings - Fork 1
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
5ff4885
commit a822395
Showing
4 changed files
with
27 additions
and
86 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
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 |
---|---|---|
@@ -1,28 +1,41 @@ | ||
name: deploy-mkdocs | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop # Triggers deployment on push to the main branch | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
needs: build # This ensures that the deployment job runs after the build job | ||
if: github.ref == 'refs/heads/develop' # Only deployed for the develop branch | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
python-version: 3.9 | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
mkdocs-bibtex- | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install mkdocs mkdocs-material==8.1.1 pymdown-extensions mkdocs-click | ||
- name: Build and Deploy | ||
- name: Build MKDocs Documentation | ||
run: mkdocs build --verbose | ||
- name: Deploy MKDocs to GitHub Pages | ||
run: | | ||
mkdocs gh-deploy --config-file ../nomad-schema-plugin-simulation-data/mkdocs.yml --force --remote-branch gh-pages | ||
if [ -n "$GITHUB_TOKEN" ]; then | ||
mkdocs gh-deploy --force | ||
else | ||
echo "Set the GH_PAGES_TOKEN secret in your repository for deploying to GitHub Pages." | ||
exit 1 | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAGES_TOKEN }} |
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
This file was deleted.
Oops, something went wrong.