Skip to content

Commit

Permalink
Add deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
uschmidt83 committed Jan 30, 2024
1 parent e6e0bd6 commit 175e793
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: deploy
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v4
with:
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-
- run: make install
- run: make deploy
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"yaml.schemas": {
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml",
"https://json.schemastore.org/github-workflow.json": ".github/workflows/deploy.yml"
},
"yaml.customTags": [
"!ENV scalar",
Expand Down
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ serve:
build:
$(MKDOCS) $@ --clean # --verbose

# deploy:
# make clean html html
# cd "$(DEPLOYDIR)" && git reset --hard && git clean -fd && git rm -r .
# cp $(BUILDDIR)/html/.nojekyll "$(DEPLOYDIR)"
# cp -r $(BUILDDIR)/html/* "$(DEPLOYDIR)"
# cd "$(DEPLOYDIR)" && git add .
# cd "$(DEPLOYDIR)" && git commit -m "Update" && git push origin master
install:
python -m pip install -r requirements.txt

deploy:
$(MKDOCS) gh-deploy --force

0 comments on commit 175e793

Please sign in to comment.