(PR) Added the Colored and B&W Diagrams #312
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: Frontend Deployment and Hosting | |
on: | |
push: | |
branches: | |
- master | |
- main | |
- develop | |
pull_request: | |
branches: | |
- master | |
- main | |
- develop | |
jobs: | |
build-and-push-frontend: | |
runs-on: ubuntu-latest | |
name: "DockerHub: Frontend" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Setup Node.js Environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERUSSER }} | |
password: ${{ secrets.DOCKERPASS }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push frontend Docker image | |
run: | | |
echo "--------- Building frontend Docker image -----------" | |
docker build -t infiniteloopers-frontend-app ./frontend | |
docker tag infiniteloopers-frontend-app ${{ secrets.DOCKERUSSER }}/infiniteloopers-frontend-app:v1 | |
docker push ${{ secrets.DOCKERUSSER }}/infiniteloopers-frontend-app:v1 | |
env: | |
BACKEND_URL: ${{ secrets.BACKEND_URL }} | |
# deploy-frontend: | |
# runs-on: ubuntu-latest | |
# needs: build-and-push-frontend | |
# name: "Heroku: Frontend App Hosting" | |
# 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 "${{ secrets.HEROKU_FRONTEND }}" | |
# git subtree push --prefix frontend heroku master |