Skip to content

Merge pull request #6 from calimania/feat/page-albums #20

Merge pull request #6 from calimania/feat/page-albums

Merge pull request #6 from calimania/feat/page-albums #20

Workflow file for this run

name: Build and Deploy
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
workflow_dispatch:
env:
REACT_APP_STRAPI_URL: ${{ secrets.STRAPI_URL }}
REACT_APP_STORE_SLUG: ${{ secrets.STORE_SLUG }}
REACT_APP_POSTHOG_KEY: ${{ secrets.POSTHOG_ID }}
permissions:
contents: write
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./build
deploy:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4