add action
This commit is contained in:
1 parent
a8592e1334
commit
2662dc3f6e
2 files changed
+70
No files matched your search
@@ -0,0 +1,31 @@
|
||||
name: Update Website
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: content
|
||||
- name: Update repository
|
||||
run: |
|
||||
git clone https://x-access-token:${GH_TOKEN}@github.com/craisined/public-notes-quartz.git
|
||||
rm -rf public-notes-quartz/content/*
|
||||
cp -a content/. public-notes-quartz/content/
|
||||
cd public-notes-quartz
|
||||
git config user.name "craisined"
|
||||
git config user.email "[email protected]"
|
||||
git add .
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes to commit"
|
||||
exit 0
|
||||
fi
|
||||
git commit -m "Update content"
|
||||
git push
|
||||
env:
|
||||
GH_TOKEN: ${{secrets.GH_TOKEN}}
|
||||
Reference in new issue
Block a user