update deploy.yml #8
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 gh-pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: npm run build | |
- name: Add dist folder | |
run: git add dist -f | |
env: | |
GIT_AUTHOR_NAME: pfrito | |
GIT_AUTHOR_EMAIL: [email protected] | |
GIT_COMMITTER_NAME: pfrito | |
GIT_COMMITTER_EMAIL: [email protected] | |
- name: Commit changes | |
run: git commit -m "adding dist" | |
env: | |
GIT_AUTHOR_NAME: pfrito | |
GIT_AUTHOR_EMAIL: [email protected] | |
GIT_COMMITTER_NAME: pfrito | |
GIT_COMMITTER_EMAIL: [email protected] | |
- name: Push to gh-pages | |
run: git push origin --delete gh-pages && git subtree push --prefix dist https://github.com/pfrito/Multiple-Sclerosis-Diagnosis gh-pages | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |