This commit is contained in:
parent
b05d0e2819
commit
fcaad59eff
4 changed files with 21 additions and 48 deletions
44
.github/workflows/vite_deploy.yaml
vendored
44
.github/workflows/vite_deploy.yaml
vendored
|
@ -1,44 +0,0 @@
|
||||||
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
|
|
19
.woodpecker.yaml
Normal file
19
.woodpecker.yaml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
steps:
|
||||||
|
- name: deploy
|
||||||
|
image: node:current-alpine
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache zip curl
|
||||||
|
- rm package-lock.json
|
||||||
|
- npm install
|
||||||
|
- npm run build
|
||||||
|
- (cd dist && zip -r ../project.zip ./*)
|
||||||
|
|
||||||
|
- 'AUTH_HEADER="Authorization: Bearer $PAGES_API_KEY"'
|
||||||
|
- API_URL=https://pages.hadeedahmad.com/pages/$(basename "$PWD")
|
||||||
|
- curl -s -w "%{http_code}" -F "zipfile=@project.zip" -H "$AUTH_HEADER" "$API_URL" | grep -q 200
|
||||||
|
|
||||||
|
secrets: [ PAGES_API_KEY ]
|
||||||
|
when:
|
||||||
|
- event: manual
|
||||||
|
- event: push
|
||||||
|
branch: main
|
|
@ -1,5 +1,3 @@
|
||||||
# Frontend Mentor - Product preview card component solution
|
# Frontend Mentor - Product preview card component solution
|
||||||
|
|
||||||
This is a solution to the [Product preview card component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/product-preview-card-component-GO7UmttRfa). Frontend Mentor challenges help you improve your coding skills by building realistic projects.
|
This is a solution to the [Product preview card component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/product-preview-card-component-GO7UmttRfa).
|
||||||
|
|
||||||
![](./screenshot.jpg)
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
base: "/fem-product-preview-card/",
|
base: "/product-preview-card/",
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue