Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
BurkhalterY authored Jun 17, 2024
1 parent 07d0aa4 commit cb76876
Showing 1 changed file with 27 additions and 11 deletions.
38 changes: 27 additions & 11 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,45 @@ on:
push:
branches:
- vue3

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "14"
- uses: actions/cache@v1
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
version: 9
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-pnpm-store-
- name: Build
run: |
npm install
npm run build
cp dist/index.html dist/404.html
pnpm i
pnpm build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: prod
FOLDER: dist

0 comments on commit cb76876

Please sign in to comment.