Merge pull request #3 from kperpignant/changes #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout devLog | |
| uses: actions/checkout@v4 | |
| - name: Deploy to kperpignant.github.io | |
| env: | |
| DEPLOY_TOKEN: ${{ secrets.PAGES_DEPLOY_TOKEN }} | |
| run: | | |
| git clone https://${DEPLOY_TOKEN}@github.com/kperpignant/kperpignant.github.io.git pages-repo | |
| cd pages-repo | |
| rm -rf devlog | |
| mkdir -p devlog | |
| cp ../index.html ../post.html ../style.css ../posts.json devlog/ | |
| cp -r ../posts devlog/ | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add devlog | |
| if git diff --staged --quiet; then | |
| echo "No changes to deploy" | |
| else | |
| git commit -m "Update devlog from devLog" | |
| git push | |
| fi |