Merge branch 'assignment' of https://github.com/DataFlowAnalysis/WebE… #307
Workflow file for this run
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: Build using vite and deploy to GitHub Pages when on main | |
on: | |
- push | |
# Configures premissions for the used GitHub Token that are required for Pages. | |
permissions: | |
contents: read # To get the source | |
pages: write # To deploy to pages | |
id-token: write # To verify deployment (done automatically by the official action) | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: npm | |
- name: Install dependencies | |
run: npm install | |
- name: Build project | |
run: npm run build | |
- name: Upload Pages artifact | |
if: github.ref == 'refs/heads/main' | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "./dist/" | |
- name: Deploy to GitHub Pages | |
if: github.ref == 'refs/heads/main' | |
uses: actions/deploy-pages@v4 |