Skip to content

Merge pull request #2 from XanderXAJ/dependabot/github_actions/action… #28

Merge pull request #2 from XanderXAJ/dependabot/github_actions/action…

Merge pull request #2 from XanderXAJ/dependabot/github_actions/action… #28

Workflow file for this run

# Based on: https://vitejs.dev/guide/static-deploy.html
name: Publish to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch: # Allow manual invocations of this workflow
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm install
- name: Build app with GitHub Pages base
run: npm run build -- --base /${{ github.event.repository.name }}
- name: Configure Pages (if this fails, set Pages source to GitHub Actions in repo settings)
uses: actions/configure-pages@v3
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./dist
deploy:
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # To deploy to Pages
id-token: write # To verify the deployment originates from an appropriate source
# Deploy to the GitHub pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Allow one concurrent deployment
concurrency:
group: ${{ github.workflow }}-deploy
runs-on: ubuntu-latest
steps:
- name: Deploy pages artifact
uses: actions/deploy-pages@v3
id: deployment