Skip to content

Merge pull request #121 from Sirpyerre/sirpyerre/config-path #3

Merge pull request #121 from Sirpyerre/sirpyerre/config-path

Merge pull request #121 from Sirpyerre/sirpyerre/config-path #3

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- master
permissions:
contents: write
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Create .env file
run: |
echo VITE_YOUTUBE_API_KEY=${{ secrets.VITE_YOUTUBE_API_KEY }} >> .env
echo VITE_YOUTUBE_CHANNEL_ID=${{ secrets.VITE_YOUTUBE_CHANNEL_ID }} >> .env
echo VITE_BASE_PATH=${{ secrets.VITE_BASE_PATH }} >> .env
- name: Build the project
run: npm run build
- name: Add CNAME file for custom domain
run: echo "phpmexico.mx" > ./dist/CNAME
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
cname: phpmexico.mx