Skip to content

Remove .env and update package.json #6

Remove .env and update package.json

Remove .env and update package.json #6

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main # or master, depending on your default branch name
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Create .env file
run: |
echo "REACT_APP_GITHUB_TOKEN=${{ secrets.REACT_APP_GITHUB_TOKEN }}" > .env
echo "REACT_APP_GITHUB_OWNER=hirosystems" >> .env
echo "REACT_APP_GITHUB_REPO=hiro-experience-map" >> .env
echo "REACT_APP_GITHUB_PROJECT_NUMBER=58" >> .env
- name: Build
run: |
npm run build || (echo "Build failed" && exit 1)
ls -la build/
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './build'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4