Updated The Auth Setup #2
Workflow file for this run
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 Frontend to Heroku | |
on: | |
push: | |
branches: | |
- feature/fix_hosting | |
pull_request: | |
branches: | |
- feature/fix_hosting | |
jobs: | |
deploy-frontend: | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
registry-url: 'https://npm.pkg.github.com' | |
- name: Set Git User Info | |
run: | | |
git config --global user.name "${{ secrets.GIT_USER }}" | |
git config --global user.email "${{ secrets.GIT_USER_EMAIL }}" | |
- name: Set up Heroku CLI | |
run: curl https://cli-assets.heroku.com/install.sh | sh | |
- name: Authenticate with Heroku | |
run: | | |
echo "machine api.heroku.com login ${{ secrets.HEROKU_EMAIL }} password ${{ secrets.HEROKU_API_KEY }}" > ~/.netrc | |
echo "machine git.heroku.com login ${{ secrets.HEROKU_EMAIL }} password ${{ secrets.HEROKU_API_KEY }}" >> ~/.netrc | |
- name: Pushing Frontend Directory to Heroku | |
run: | | |
git clone https://github.com/COS301-SE-2024/The-Republic.git | |
cd The-Republic | |
heroku git:remote -a 'infiniteloopers-frontend-app' | |
git subtree push --prefix frontend heroku master |