an automated quick commit and push (tpush) #13
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: Deploy to t-ibrahimm.github.io | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout t-website repository | |
uses: actions/checkout@v2 | |
- name: Checkout t-ibrahimm.github.io repository | |
uses: actions/checkout@v2 | |
with: | |
repository: t-ibrahimm/t-ibrahimm.github.io | |
token: ${{ secrets.TARGET_REPO_TOKEN }} | |
path: deploy | |
- name: Copy files | |
run: cp -r $(ls -A | grep -v deploy) deploy/ | |
- name: Commit and push changes | |
run: | | |
cd deploy | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "Update from t-website" || echo "No changes to commit" | |
git push origin master | |
- name: Install dependencies and deploy | |
run: | | |
cd deploy | |
yarn install | |
yarn deploy |