Skip to content

Commit

Permalink
Updated github workflows (steps)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladleesi committed Apr 5, 2024
1 parent 5b240a6 commit e0b51ed
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-test-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ jobs:
uses: ad-m/github-push-action@master
with:
branch: master
force: true
force: true
github_token: ${{ secrets.PAT }}
40 changes: 21 additions & 19 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,32 @@ name: GitHub Pages

on:
push:
branches: [ master ]

permissions:
contents: read
deployments: write
branches:
- master

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@v5
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4

- name: Install mkdocs
run: pip install mkdocs

- name: Generate site
run: mkdocs gh-deploy --force --clean

- name: Deploy to gh-pages
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
token: ${{ secrets.PAT }}
branch: gh-pages # The branch the action should deploy to.
folder: site # The folder the action should deploy.
clean: true # Automatically remove deleted files from the deploy branch

0 comments on commit e0b51ed

Please sign in to comment.