Skip to content

Update github-pages.yml #52

Update github-pages.yml

Update github-pages.yml #52

Workflow file for this run

name: github pages
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run build
env:
REACT_APP_MAPBOX_STYLE_URL: "mapbox://styles/mutualaid/clmmsz0v601vw01rd74oa86r3"
REACT_APP_MAPBOX_API_KEY: "pk.eyJ1IjoibXV0dWFsYWlkIiwiYSI6ImNsbGNvZm44cTAyc2EzcW8wcDg2a2pqN3IifQ.r8mXm_fCmzFm3_Ph2nd4Sw"
REACT_APP_PROD_FIRESTORE_URL: "https://firestore.googleapis.com/v1/projects/townhallproject-86312/databases/(default)/documents/mutual_aid_networks"
NODE_ENV: 'production'
REACT_APP_PROD_FIREBASE_API_KEY: 'AIzaSyCXyjAOvBKDEX5pckTwuI7LODWKNlL21gc'
REACT_APP_PROD_FIREBASE_AUTH_DOMAIN: townhallproject-86312.firebaseapp.com'
REACT_APP_PROD_DATABASE_URL: 'https://townhallproject-86312.firebaseio.com'
REACT_APP_PROD_STORAGE_BUCKET: 'townhallproject-86312.appspot.com'
REACT_APP_PROD_MESSAGING_SENDER_ID: 208752196071
REACT_APP_PROD_PROJECT_ID: 'townhallproject-86312'
- name: Prepare tag
id: prepare_tag
if: startsWith(github.ref, 'refs/tags/')
run: |
TAG_NAME="${GITHUB_REF##refs/tags/}"
echo "::set-output name=tag_name::${TAG_NAME}"
echo "::set-output name=deploy_tag_name::deploy-${TAG_NAME}"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
tag_message: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}'