kanglerian #36
This file contains 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: Github Personal Website | |
run-name: ${{ github.actor }} | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: npm install | |
- name: Build project | |
run: npm run build | |
- name: After build project | |
run: | | |
rm -rf README.md node_modules index.html package.json package-lock.json public src tailwind.config.js vite.config.js yarn.lock | |
mv -f dist/* . | |
rm -rf dist | |
ls -l | |
- name: Deploy to GitHub Pages | |
env: | |
GITHUB_TOKEN: ${{ secrets.DEPLOY }} | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git fetch origin | |
git add . | |
git commit -m "coba" | |
git push -u origin gh-pages |