Skip to content

Merge pull request #9 from salman-ibrahim/workflow-update #10

Merge pull request #9 from salman-ibrahim/workflow-update

Merge pull request #9 from salman-ibrahim/workflow-update #10

Workflow file for this run

name: Deploy to GitHub Pages 🚀
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
runs-on: ubuntu-latest
env:
VITE_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload Artifact
uses: actions/upload-pages-artifact@v1
with:
path: './dist'
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v1