diff --git a/.github/workflows/vite_deploy.yaml b/.github/workflows/vite_deploy.yaml new file mode 100644 index 0000000..35d1f0f --- /dev/null +++ b/.github/workflows/vite_deploy.yaml @@ -0,0 +1,44 @@ +name: Deploy static content to Pages + +on: + push: + branches: ["main"] + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + - name: Install dependencies + run: npm install + - name: Build + run: npm run build + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: "./dist" + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/README.md b/README.md new file mode 100644 index 0000000..2ef274c --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Frontend Mentor - Blog preview card solution + +This is a solution to the [Blog preview card challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/blog-preview-card-ckPaj01IcS). Frontend Mentor challenges help you improve your coding skills by building realistic projects. diff --git a/package.json b/package.json index 2077673..e2b7f52 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,9 @@ { "type": "module", + "scripts": { + "dev": "vite --open", + "build": "vite build" + }, "devDependencies": { "prettier": "^3.3.2", "prettier-plugin-css-order": "^2.1.2", diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..ac0a177 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,5 @@ +import { defineConfig } from "vite"; + +export default defineConfig({ + base: "/fem-blog-preview-card/", +});