Update project thumbnail #70
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: Build and deploy to GitHub Pages | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v2.3.1 | |
- name: Install, lint, build 🔧 | |
env: | |
ROUTING_BASENAME: ${{ vars.REACT_APP_ROUTING_BASENAME }} | |
FUNC_SHOW_LESS: ${{ vars.REACT_APP_FUNC_SHOW_LESS }} | |
API_KEY: ${{secrets.TMDB_API_KEY}} | |
run: | | |
echo "REACT_APP_ROUTING_BASENAME=${ROUTING_BASENAME}" > .env | |
echo ".env file was created and with the value of routing basename:" | |
echo "REACT_APP_ROUTING_BASENAME=${ROUTING_BASENAME}" | |
echo "" | |
echo "REACT_APP_FUNC_SHOW_LESS=${FUNC_SHOW_LESS}" >> .env | |
echo "Added FUNC_SHOW_LESS varuable into .env file:" | |
echo "REACT_APP_FUNC_SHOW_LESS=${FUNC_SHOW_LESS}" | |
echo "" | |
echo "===" | |
echo ".env file content with all environmental variables:" | |
echo "" | |
cat .env | |
echo "===" | |
echo "REACT_APP_TMDB_API_KEY=${API_KEY}" >> .env | |
echo "Added secret API key into .env file." | |
echo "" | |
npm install | |
npm run lint:js | |
npm run build | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@4.1.0 | |
with: | |
branch: gh-pages | |
folder: build |