Update pages_deploy.yml #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Vue.js CI/CD | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Set .env params | |
run: | | |
echo "VITE_APP_API_URL=https://dishapi-cuczdxckhdh4caev.eastus-01.azurewebsites.net/" > .env | |
- name: Configure base URL for GitHub Pages | |
run: echo "VITE_APP_PUBLIC_PATH='/'" >> .env | |
- name: Build the Vue.js app | |
run: npm run build | |
- name: Add CNAME file | |
run: echo "d-i-s-h.github.io" > dist/CNAME | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
publish_branch: gh-pages |