mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-07-13 08:07:11 +02:00
Website Build with Roadmap.
This commit is contained in:
@@ -22,10 +22,10 @@ env:
|
||||
|
||||
concurrency:
|
||||
group: website-build-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-website:
|
||||
@@ -50,10 +50,25 @@ jobs:
|
||||
- name: Build website
|
||||
working-directory: website
|
||||
run: npm run build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload website artifact
|
||||
uses: actions/upload-artifact@v4.3.4
|
||||
with:
|
||||
name: kst4contest-website
|
||||
path: website/_site/
|
||||
retention-days: 7
|
||||
retention-days: 7
|
||||
|
||||
- name: Commit rebuilt site
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add website/_site
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes to commit"
|
||||
else
|
||||
git commit -m "chore: rebuild website [skip ci]"
|
||||
git push
|
||||
fi
|
||||
Reference in New Issue
Block a user