Skip to content

Update versions and deploy #258

Update versions and deploy

Update versions and deploy #258

Workflow file for this run

name: Update versions and deploy
on:
workflow_dispatch:
push:
branches:
- master
schedule:
- cron: '0 2 * * *'
jobs:
update-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Configure Git
run: |
git config url.https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/.insteadOf https://github.com/
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Update versions
run: bash bin/update-versions.sh
- name: Commit and push changes
run: |
date +%m >.github/keep-alive
git add .
if ! git diff --cached --quiet; then
git commit -m "update versions"
git push origin
else
echo "No changes to commit."
fi
- name: Deploy gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: public
cname: registry.automad.org