Skip to content

Merge branch 'main' of https://github.com/Chapter-1/frontend #25

Merge branch 'main' of https://github.com/Chapter-1/frontend

Merge branch 'main' of https://github.com/Chapter-1/frontend #25

Workflow file for this run

name: Deploy static content to Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Create env file
run: |
touch .env.production
echo "VITE_APP_API_URL=${{ secrets.VITE_APP_API_URL }}" >> .env.production
echo "NODE_ENV=production" >> .env.production
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
VITE_APP_API_URL: ${{ secrets.VITE_APP_API_URL }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1